Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #14 from philippsimon/master
Browse files Browse the repository at this point in the history
Fix for OS X, mocha tests & eslint added, general cleanup
  • Loading branch information
mkschreder committed Apr 27, 2016
2 parents 59aef24 + 019fcf2 commit 78f812b
Show file tree
Hide file tree
Showing 11 changed files with 334 additions and 210 deletions.
27 changes: 27 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,27 @@
{
"env": {
"node": true
},
"extends": "eslint:recommended",
"ignore": [
"node_modules"
],
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
}
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
node_modules/
File renamed without changes.
51 changes: 18 additions & 33 deletions README.md
@@ -1,30 +1,33 @@
<center>![Node PHP](https://raw2.github.com/mkschreder/siteboot_php/master/node_php_small.jpg)</center>
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

```
npm install node-php
```

Usage
-----

To run wordpress with node js and express do this:

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

var app = express();

app.use("/", php.cgi("/path/to/wordpress"));
```javascript
var express = require('express');
var php = require("node-php");
var path = require("path");

var app = express();

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

app.listen(9090);
app.listen(9090);

console.log("Server listening!");
console.log("Server listening!");
```

Explanation
-----------
Expand All @@ -41,24 +44,6 @@ Dependencies
License
-------

This software is distributed under MIT license.

Copyright (c) 2014-2016 Martin K. Schröder <mkschreder.uk@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Copyright © 2014-2016 Martin K. Schröder <mkschreder.uk@gmail.com>

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MIT License (MIT) - See [LICENSE](./LICENSE) for further details.

0 comments on commit 78f812b

Please sign in to comment.