move list, mail, user router to main
This commit is contained in:
parent
cab04596e8
commit
66c01a350d
6
app.js
6
app.js
@ -43,16 +43,10 @@ app.use(cookieParser());
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
|
||||
var mainRouter = require('./routes/main');
|
||||
var listRouter = require('./routes/list');
|
||||
var apiRouter = require('./routes/api/apiRouter');
|
||||
var mailRouter = require('./routes/mail');
|
||||
//var userRouter = require('./routes/user');
|
||||
|
||||
app.use('/', mainRouter);
|
||||
app.use('/list', listRouter);
|
||||
app.use('/api', apiRouter);
|
||||
app.use('/mail', mailRouter);
|
||||
//app.use('/user', userRouter);
|
||||
|
||||
// catch 404 and forward to error handler
|
||||
app.use(function (req, res, next) {
|
||||
|
@ -1,9 +0,0 @@
|
||||
var express = require('express');
|
||||
var router = express.Router();
|
||||
|
||||
/* GET home page. */
|
||||
router.get('/', function (req, res, next) {
|
||||
res.render('list', {title: 'List'});
|
||||
});
|
||||
|
||||
module.exports = router;
|
@ -1,10 +0,0 @@
|
||||
var express = require('express');
|
||||
|
||||
var router = express.Router();
|
||||
|
||||
/* GET home page. */
|
||||
router.get('/', function (req, res, next) {
|
||||
res.redirect('https://privateemail.com/');
|
||||
});
|
||||
|
||||
module.exports = router;
|
@ -10,4 +10,15 @@ router.get('/old', function (req, res, next) {
|
||||
res.render('main/1_0', { title: 'Nikola Petrov' });
|
||||
});
|
||||
|
||||
router.get('/mail', function (req, res, next) {
|
||||
res.redirect('https://privateemail.com/');
|
||||
});
|
||||
|
||||
router.get('/list', function (req, res, next) {
|
||||
res.render('list', {title: 'List'});
|
||||
});
|
||||
|
||||
const userRouter = require('./user');
|
||||
//router.use('/user', userRouter);
|
||||
|
||||
module.exports = router;
|
Loading…
x
Reference in New Issue
Block a user