changed to express.io

pull/5/head
Marian Oancea 10 years ago
parent 70d0ea6839
commit 3054ad1921
  1. 8
      app.js
  2. 2
      package.json
  3. 3
      routes/index.js
  4. 5
      routes/stats.js

@ -1,4 +1,4 @@
var express = require('express');
var express = require('express.io');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
@ -6,7 +6,9 @@ var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/index');
var users = require('./routes/users');
var stats = require('./routes/stats');
express().http().io();
var app = express();
@ -24,7 +26,7 @@ app.use(require('stylus').middleware(path.join(__dirname, 'public')));
app.use(express.static(path.join(__dirname, 'public')));
app.use('/', routes);
app.use('/users', users);
app.use('/stats', stats);
// catch 404 and forward to error handler
app.use(function(req, res, next) {

@ -6,7 +6,7 @@
"start": "node ./bin/www"
},
"dependencies": {
"express": "~4.9.0",
"express.io": "^1.1.13",
"body-parser": "~1.8.1",
"cookie-parser": "~1.3.3",
"morgan": "~1.3.0",

@ -1,5 +1,4 @@
var express = require('express');
var router = express.Router();
var router = require('express.io')();
/* GET home page. */
router.get('/', function(req, res) {

@ -1,7 +1,6 @@
var express = require('express');
var router = express.Router();
var router = require('express.io')();
/* GET users listing. */
/* GET stats listing. */
router.get('/', function(req, res) {
res.send('respond with a resource');
});
Loading…
Cancel
Save