1
- <center ></center >
2
1
NodePHP - run wordpress (and other php scripts) with node
3
- ---------------------------------
2
+ ---------------------------------------------------------
4
3
5
4
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.
6
5
7
6
Installation
8
7
------------
9
8
10
- npm install node-php
11
-
9
+ ```
10
+ npm install node-php
11
+ ```
12
+
12
13
Usage
13
14
-----
14
15
15
16
To run wordpress with node js and express do this:
16
17
17
- var express = require('express');
18
- var php = require("node-php");
19
- var path = require("path");
20
-
21
- var app = express();
22
-
23
- app.use("/", php.cgi("/path/to/wordpress"));
18
+ ``` javascript
19
+ var express = require (' express' );
20
+ var php = require (" node-php" );
21
+ var path = require (" path" );
22
+
23
+ var app = express ();
24
+
25
+ app .use (" /" , php .cgi (" /path/to/wordpress" ));
24
26
25
- app.listen(9090);
27
+ app .listen (9090 );
26
28
27
- console.log("Server listening!");
29
+ console .log (" Server listening!" );
30
+ ```
28
31
29
32
Explanation
30
33
-----------
@@ -41,24 +44,6 @@ Dependencies
41
44
License
42
45
-------
43
46
44
- This software is distributed under MIT license.
45
-
46
- Copyright (c) 2014-2016 Martin K. Schröder <
[email protected] >
47
-
48
- Permission is hereby granted, free of charge, to any person obtaining a copy
49
- of this software and associated documentation files (the "Software"), to deal
50
- in the Software without restriction, including without limitation the rights
51
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
52
- copies of the Software, and to permit persons to whom the Software is
53
- furnished to do so, subject to the following conditions:
54
-
55
- The above copyright notice and this permission notice shall be included in all
56
- copies or substantial portions of the Software.
47
+ Copyright © 2014-2016 Martin K. Schröder <
[email protected] >
57
48
58
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
59
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
60
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
61
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
62
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
63
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
64
- SOFTWARE.
49
+ The MIT License (MIT) - See [ LICENSE] ( ./LICENSE ) for further details.
0 commit comments