FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node-php-cgi/server.js at master · cgi-js/node-php-cgi · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
cgi-js
/
node-php-cgi
Public
forked from
mkschreder/node-php
Notifications
You must be signed in to change notification settings
Fork
1
Star
4
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
node-php-cgi
/
server.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
15 lines (12 loc) · 456 Bytes
Breadcrumbs
node-php-cgi
/
server.js
Copy path
File metadata and controls
15 lines (12 loc) · 456 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var
express
=
require
(
'express'
)
;
var
php
=
require
(
"./main"
)
;
// var php = require("phpcgijs");
var
path
=
require
(
"path"
)
;
var
app
=
express
(
)
;
var
p
=
path
.
join
(
"test/php"
)
;
app
.
use
(
"/"
,
php
.
cgi
(
p
,
{
cgi_path
:
'/usr/bin/'
,
options
:
{
"-c"
:
"/etc/php.ini"
}
}
)
)
app
.
use
(
"*"
,
function
(
req
,
res
)
{
return
res
.
send
(
"Thank you for using node-cgi-php. Please map your urls"
)
}
)
app
.
listen
(
9090
,
'127.0.0.1'
)
;
console
.
log
(
"Server listening at 9090!"
)
;
Back
|
FazBrowse Home
|
New Git URL