Add submit page
parent
14b099d720
commit
a23bf1ae3b
2
app.js
2
app.js
|
@ -6,6 +6,7 @@ var logger = require('morgan');
|
|||
|
||||
var indexRouter = require('./routes/index');
|
||||
var usersRouter = require('./routes/users');
|
||||
var submitRouter = require('./routes/submit')
|
||||
|
||||
var app = express();
|
||||
|
||||
|
@ -21,6 +22,7 @@ app.use(express.static(path.join(__dirname, 'public')));
|
|||
|
||||
app.use('/', indexRouter);
|
||||
app.use('/users', usersRouter);
|
||||
app.use('/submit', submitRouter);
|
||||
|
||||
// catch 404 and forward to error handler
|
||||
app.use(function(req, res, next) {
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
var express = require('express');
|
||||
var router = express.Router();
|
||||
|
||||
/* GET submit page. */
|
||||
router.get('/', function(req, res, next) {
|
||||
res.render('submit', { title: 'Express' });
|
||||
});
|
||||
|
||||
module.exports = router;
|
Reference in New Issue