forked from davidcoallier/node-php
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp.js
More file actions
Latest commit
18 lines (17 loc) · 604 Bytes
/
Copy pathphp.js
File metadata and controls
18 lines (17 loc) · 604 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/**
* First we include our new webserver.
*/
varphp=require('./lib/nodephp.js');
/**
* Second we use it. This will create a new webserve on port 9001 and
* will interact with fcgi on localhost and port 9000.
*
* This script will run with the "document_root" from where it's being
* ran so if you run it from /var/www/test the "document_root" will be
* ... wait for it... "/var/www/test".
*/
server=php.nodephp({fcgi: {host: '127.0.0.1',port: 9010}},{
"\.(js|css|png|jpg|jpeg|gif|txt|less)$": php.NODEPHP_TYPE_STATIC,
"\.php$": php.NODEPHP_TYPE_FCGI,
"index": "index.php"
});