updated express version for example
updated the example to work with express version 4.10.6. Removed connect middleware. Added serve-static and body-parser middleware. Updated package.json to reflect changes
This commit is contained in:
@ -9,10 +9,11 @@ var jwt_secret = 'foo bar big secret';
|
||||
|
||||
var app = express();
|
||||
|
||||
app.configure(function(){
|
||||
this.use(express.json());
|
||||
this.use(express.static(__dirname + '/public'));
|
||||
});
|
||||
var serveStatic = require('serve-static')
|
||||
var bodyParser = require('body-parser');
|
||||
|
||||
app.use(serveStatic('public', {'index': ['index.html']}))
|
||||
app.use(bodyParser.json());
|
||||
|
||||
app.post('/login', function (req, res) {
|
||||
var profile = {
|
||||
|
Reference in New Issue
Block a user