Created
November 2, 2014 23:45
-
-
Save quentar/2f5adfa7046082105efa to your computer and use it in GitHub Desktop.
node-cgi script with absolute paths - mac os x server 10.9.4
This file contains hidden or 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
#!/usr/bin/env /usr/local/bin/node | |
/*jshint node: true */ | |
/* had to change path to be absolute , mac os x server 10.9.4 (had to also enable CGI on apache settings)*/ | |
'use strict'; | |
var Processor = require('/usr/local/lib/node_modules/node-cgi/lib/Processor'); | |
var filename = process.env.PATH_TRANSLATED; | |
var options = { | |
defaultType: 'js', | |
typeByExt: { | |
'.jade.nd': 'jade', | |
'.html.nd': 'html' | |
} | |
}; | |
Processor.processFile(filename, options).toStdout(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment