Listen to process.env.PORT
and fallback to port 8001 will make your life easier. By default process.env.PORT
is set to port 80.
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World!\n');
}).listen(parseInt(process.env.PORT) || 8001);
You can easily add your team members to your provisioned machine. Ssh into your node smartmachine and run this command. The following will add jill and sally's ssh keys to your machine...
curl -k https://api.no.de/userkeys/jill/sally >> ~/.ssh/authorized_keys
If you are using npm on your node smartmachine you will want to do this. There are two ways to add .node_libraries to you path.
# top of server.js
require.paths.unshift("/home/node/.node_libraries")
OR
# add the following to `~/node-service/profile` in your smartmachine
NODE_PATH=/home/node/.node_libraries