
const express = require('express');
const router = express.Router();
router.get('/', function (req, res) {
	const name = req.query.name;
	const pass = req.query.pass;
	const opt = {
		title: 'Express',
		name: name,
		pass: pass
	}
	res.render('index', opt);
});

router.post('/', function (req, res) {
	let name = req.body.f1;
	let pass = req.body.f2;
	let msg = 'name: ' + name +
		', password: ' + pass;
	let opt = {
		title: 'Express',
		message: msg
	}
	res.render('index', opt);
});
module.exports = router;

