New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-php

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-php

Node JS modules for running wordpress in node js

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source
![Node PHP](https://raw2.github.com/mkschreder/siteboot_php/master/node_php_small.jpg) NodePHP - run wordpress (and other php scripts) with node ---------------------------------

With Node PHP you can leverage the speed of node js and run all of the widely available php scripts directly inside your express site.

Installation

npm install node-php

Usage

To run wordpress with node js and express do this:

var express = require('express');
var php = require("php"); 
var path = require("path"); 

var app = express();

app.use("/", php.cgi("/path/to/wordpress")); 

app.listen(9090);

console.log("Server listening!"); 

Explanation

The script will pipe all files that end in the .php extension through the php parser. All other files will be served as static content.

Basic permalinks are supported but the support for them can probably be improved.

Dependencies

  • php-cgi - you need to have the interpreter installed in order to use this extension

FAQs

Package last updated on 26 Jan 2014

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