Skip to content

Butonix/express-php-fpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express middleware for php-fpm

Express middleware for handling php requests and serve static files.

It can be used as replacement for Apache and avoid proxy practice.

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?

how to video

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)

Author

Software was created in January 2017 by Pravdomil.com. You can buy a beer for him.

About

Express middleware for php-fpm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published