Monday, 4 March 2013
Node
1.Install
------------------------------------------------------------------------------
[mongodb]
brew update
brew install mongodb
brew update
brew upgrade mongodb
Install Node.js intsaller from
http://www.mongodb.org/downloads
[npm] (Node package manager)
npm search
sudo npm install express -g
Blog Application
2.------------------------------------------------------------------------------
mkdir node_js_blog
cd node_js_blog
express -c stylus
cd . && npm install
npm install -d
3.make a file app.js in the root folder
------------------------------------------------------------------------------
// Module dependencies.
// var express = require('express');
// var app = express.createServer();
var express = require("express");
var app = express();
// Configuration
app.configure( function() {
});
// Routes
app.get('/', function(req, res) {
res.send('Hello World');
});
app.listen(3000);
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment