Cat Chen
How did you set up a web site 10 years ago?
I was working on:
I needed to know:
I need to know:
var http = require('http');
var server = http.createServer(function(request, response) {
response.send('Hello, world!');
});
var port = 3000;
server.listen(port);
It's just like Rails or other MVC framework. It supports:
module.exports
to write modulespackage.json
and index.js
npm publish
(use npm adduser
for the first time)gem install heroku
(for the first time)heroku create --stack cedar
to create an appweb: node web.js
in a file named Procfile
package.json
is correctgit push heroku
heroku ps:scale web=1
to set web process number to 1Please read this guide for more details.
Replacement of Apache, Lighttpd, etc?
Replacement of ASP, PHP, Rails, etc?
No more Python, Ruby, Bash, Make, etc. Just JavaScript.