express-generator
Advanced tools
Comparing version 3.0.0 to 4.0.0
{ | ||
"name": "express-generator", | ||
"description": "Express' application generator", | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -7,6 +7,2 @@ [![express logo](http://f.cl.ly/items/0V2S1n0K1i3y1c122g04/Screen%20Shot%202012-04-11%20at%209.59.42%20AM.png)](http://expressjs.com/) | ||
## Installation | ||
$ npm install -g express | ||
## Quick Start | ||
@@ -18,3 +14,3 @@ | ||
$ npm install -g express | ||
$ npm install -g express-generator | ||
$ express /tmp/foo && cd /tmp/foo | ||
@@ -26,2 +22,6 @@ | ||
Rock and Roll | ||
$ npm start | ||
## License | ||
@@ -28,0 +28,0 @@ |
var express = require('express'); | ||
var http = require('http'); | ||
var path = require('path'); | ||
@@ -9,4 +8,4 @@ var favicon = require('static-favicon'); | ||
var routes = require('./routes'); | ||
var users = require('./routes/user'); | ||
var routes = require('./routes/index'); | ||
var users = require('./routes/users'); | ||
@@ -25,6 +24,5 @@ var app = express(); | ||
app.use(express.static(path.join(__dirname, 'public'))); | ||
app.use(app.router); | ||
app.get('/', routes.index); | ||
app.get('/users', users.list); | ||
app.use('/', routes); | ||
app.use('/users', users); | ||
@@ -44,2 +42,3 @@ /// catch 404 and forwarding to error handler | ||
app.use(function(err, req, res, next) { | ||
res.status(err.status || 500); | ||
res.render('error', { | ||
@@ -55,2 +54,3 @@ message: err.message, | ||
app.use(function(err, req, res, next) { | ||
res.status(err.status || 500); | ||
res.render('error', { | ||
@@ -57,0 +57,0 @@ message: err.message, |
@@ -0,4 +1,9 @@ | ||
var express = require('express'); | ||
var router = express.Router(); | ||
/* GET home page. */ | ||
exports.index = function(req, res){ | ||
router.get('/', function(req, res) { | ||
res.render('index', { title: 'Express' }); | ||
}; | ||
}); | ||
module.exports = router; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
14086
68
0