Add submit page

main
sudoer777 2021-09-30 14:49:44 -06:00
parent 14b099d720
commit a23bf1ae3b
3 changed files with 11 additions and 0 deletions

2
app.js
View File

@ -6,6 +6,7 @@ var logger = require('morgan');
var indexRouter = require('./routes/index'); var indexRouter = require('./routes/index');
var usersRouter = require('./routes/users'); var usersRouter = require('./routes/users');
var submitRouter = require('./routes/submit')
var app = express(); var app = express();
@ -21,6 +22,7 @@ app.use(express.static(path.join(__dirname, 'public')));
app.use('/', indexRouter); app.use('/', indexRouter);
app.use('/users', usersRouter); app.use('/users', usersRouter);
app.use('/submit', submitRouter);
// catch 404 and forward to error handler // catch 404 and forward to error handler
app.use(function(req, res, next) { app.use(function(req, res, next) {

9
routes/submit.js 100644
View File

@ -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;

0
views/submit.pug 100644
View File