forked from mkschreder/node-php
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mkschreder#14 from philippsimon/master
Fix for OS X, mocha tests & eslint added, general cleanup
- Loading branch information
Showing
11 changed files
with
334 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
----------- | ||
|
@@ -41,24 +44,6 @@ Dependencies | |
License | ||
------- | ||
|
||
This software is distributed under MIT license. | ||
|
||
Copyright (c) 2014-2016 Martin K. Schröder <[email protected]> | ||
|
||
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 <[email protected]> | ||
|
||
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. |
Oops, something went wrong.