Created
July 18, 2012 02:50
-
-
Save michealbenedict/3133794 to your computer and use it in GitHub Desktop.
Node.js App
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
app:~$ nodeaku deploy |
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
{ | |
"name": "helloworld", | |
"version": "0.0.1", | |
"dependencies": { | |
"nodeaku": "git+https://git.twitter.biz/nodeaku" | |
}, | |
"scripts": { | |
"start": "node <startfile>" | |
}, | |
"nodeaku": { | |
"user": "<username>", | |
"cpu": "1.0", | |
"ram": "512", | |
"disk": "512", | |
"cluster": "smf1" | |
} | |
} |
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
var http = require('http'); | |
if ( process.env.NODE_ENV === 'production' ) { console.log('env var is set to production'); } | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
}).listen(process.env.NODE_PORT); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment