@hailin_yin/express-php-fpm
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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").default

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @hailin_yin/express-php-fpm

Weekly Downloads

0

Version

1.0.2

License

none

Unpacked Size

35.9 kB

Total Files

14

Last publish

Collaborators

  • hailin_yin