diff --git a/app.js b/app.js index ab7aed4..3cff1ca 100644 --- a/app.js +++ b/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) { diff --git a/routes/submit.js b/routes/submit.js new file mode 100644 index 0000000..9f2355b --- /dev/null +++ b/routes/submit.js @@ -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; diff --git a/views/submit.pug b/views/submit.pug new file mode 100644 index 0000000..e69de29