Socket
Book a DemoInstallSign in
Socket

express-php-fpm

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-php-fpm

Express middleware for handling php requests and serve static files

npmnpm
Version
1.0.0
Version published
Weekly downloads
81
42.11%
Maintainers
1
Weekly downloads
 
Created
Source

Express middleware for php-fpm

Express middleware for handling php requests and serve static files.

how to video

 

It's working seamlessly with WordPress, Joomla, Drupal!

In order to run the middleware be sure that you have a running php-fpm server.
What is php-fpm? Why php-fpm? How to install php-fpm on Windows, Mac, Linux?

Usage & Example

npm i express-php-fpm
const express = require("express")
const epf = require("express-php-fpm")

const options = {
  // root of your php files
  documentRoot: __dirname + "/php_files",

  // extra env variables
  env: {},

  // connection to your php-fpm server
  // https://nodejs.org/api/net.html#net_socket_connect_options_connectlistener
  socketOptions: { port: 9000 },
}

const app = express()
app.use("/", epf(options))
app.listen(3000)

Donate

By buying a beer.

Keywords

programming

FAQs

Package last updated on 11 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts