0.0.13 • Published 4 years ago

js-fpm v0.0.13

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

A FastCGI Process Manager for NodeJS

How to install

npm install js-fpm

How to use

This package support the fastcgi mode, so you may config a nginx serve to access fastcgi mode to this.

nginx configuration(in server)

	location / {
		root html;
		index index.html index.htm;
		try_files $uri @node;
	}

	location @node {
		fastcgi_pass 127.0.0.1:3000;
		fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
		include        fastcgi_params;
	}

next to start:

var fpm = require("js-fpm")
fpm.run();

so, you may write so script in main.js.

Feature

fastcgi mode to serve the script(main.js)

session and cookie

file upload

etc...

Configuration

var fpm = require("js-fpm")
var options = {
    "mode" : "fastcgi", // or "http"
    "port" : "3000", // or "80"
    "ip" : "localhost", // or IP
    "main" : require("path").resolve("./main.js")
}
fpm.run(options);

options.mode

fastcgi or http fastcgi support the fastcgi protocol. http support the standard http protocol

options.port options.ip

port and ip

options.main

the execute file path

0.0.13

4 years ago

0.0.12

6 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

8 years ago