Created
July 28, 2014 13:43
-
-
Save nongio-zz/6792c34f121ebcc61e77 to your computer and use it in GitHub Desktop.
serve simple php file using nodejs
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
var cgi = require('cgi'), | |
http = require('http'), | |
path = require('path'); | |
var script = path.resolve(__dirname, 'index.php'); | |
http.createServer( cgi(script) ).listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment