
const express = require('express');
const router = express.Router();
router.get('/', (req, res) => {
	const data = {
		title: 'Express-app',
		values: ['one', 'two', 'three', 'four', 'five'], //☆
	};
	res.render('index', data);
});

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;

