Created
August 10, 2012 14:44
-
-
Save brentertz/3314731 to your computer and use it in GitHub Desktop.
Getting started with Node and Express
This file contains 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
{ | |
"engines": { | |
"node": "0.8.x", | |
"npm": "1.1.x" | |
} | |
} |
This file contains 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
$ express express-skeleton | |
create : express-skeleton | |
create : express-skeleton/package.json | |
create : express-skeleton/app.js | |
create : express-skeleton/public | |
create : express-skeleton/public/javascripts | |
create : express-skeleton/public/images | |
create : express-skeleton/public/stylesheets | |
create : express-skeleton/public/stylesheets/style.css | |
create : express-skeleton/routes | |
create : express-skeleton/routes/index.js | |
create : express-skeleton/views | |
create : express-skeleton/views/layout.jade | |
create : express-skeleton/views/index.jade | |
install dependencies: | |
$ cd express-skeleton && npm install | |
run the app: | |
$ node app |
This file contains 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
$ find . -print | grep -v .git | grep -v node_modules | |
. | |
./app.js | |
./package.json | |
./public | |
./public/images | |
./public/javascripts | |
./public/stylesheets | |
./public/stylesheets/style.css | |
./routes | |
./routes/index.js | |
./views | |
./views/index.jade | |
./views/layout.jade |
This file contains 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
$ foreman start | |
12:32:37 web.1 | started with pid 1952 | |
12:32:37 web.1 | Express server listening on port 5000 |
This file contains 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
$ node app | |
Express server listening on port 3000 |
This file contains 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
$ cd express-skeleton && npm install | |
npm http GET https://registry.npmjs.org/express/3.0.0rc2 | |
npm http GET https://registry.npmjs.org/jade | |
... | |
jade@0.27.2 ./node_modules/jade | |
├── commander@0.6.1 | |
└── mkdirp@0.3.0 | |
express@3.0.0rc2 ./node_modules/express | |
├── methods@0.0.1 | |
├── fresh@0.1.0 | |
├── range-parser@0.0.4 | |
├── cookie@0.0.4 | |
├── crc@0.2.0 | |
├── commander@0.6.1 | |
├── debug@0.7.0 | |
├── mkdirp@0.3.3 | |
├── send@0.0.3 (mime@1.2.6) | |
└── connect@2.4.2 (bytes@0.1.0, pause@0.0.1, qs@0.4.2, formidable@1.0.11) |
This file contains 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
$ node -v | |
v0.8.2 | |
$ npm -v | |
1.1.24 | |
$ git --version | |
git version 1.7.11.2 | |
hub version 1.10.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://quickleft.com/blog/getting-started-with-express-in-node