# js-fpm

> A FastCGI Process Manager for NodeJS.

Latest version **0.0.13** (published 2019-11-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install js-fpm
pnpm add js-fpm
yarn add js-fpm
bun add js-fpm
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.13 |
| Published | 2019-11-23 |
| First published | 2016-05-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 7.5 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | speedphp |
| Maintainers | speed |
| Keywords | http, fastcgi, phpfpm, proxy, nodefpm |

## Links

- npm: https://www.npmjs.com/package/js-fpm
- Repository: https://github.com/speedphp/js-fpm
- Homepage: https://github.com/speedphp/js-fpm#readme
- Issues: https://github.com/speedphp/js-fpm/issues
- npm.io page: https://npm.io/package/js-fpm

## Dependencies (6)

- [uuid](https://npm.io/package/uuid.md) ^3.1.0
- [async](https://npm.io/package/async.md) ^2.5.0
- [cookie](https://npm.io/package/cookie.md) ^0.3.1
- [tracer](https://npm.io/package/tracer.md) ^0.8.9
- [formidable](https://npm.io/package/formidable.md) ^1.1.1
- [node-fastcgi](https://npm.io/package/node-fastcgi.md) ^1.3.2

## Recent versions

- 0.0.13 (latest) — 2019-11-23
- 0.0.12 — 2017-11-14
- 0.0.11 — 2017-11-10
- 0.0.10 — 2017-08-22
- 0.0.9 — 2017-08-15
- 0.0.8 — 2017-08-15
- 0.0.7 — 2017-08-15
- 0.0.6 — 2017-08-08
- 0.0.5 — 2017-08-08
- 0.0.4 — 2017-08-07
- 0.0.3 — 2017-08-07
- 0.0.2 — 2017-02-20
- 0.0.1 — 2016-05-16

## README

# 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

---
_Source: https://npm.io/package/js-fpm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
