} = require('express');
const router = new Router();
-let alumnos = [];
+//let alumnos = [];
router.get("/", (req, res) => {
res.render("index", {
res.render("flex")
});
-router.get('/web', (req, res) => {
- res.render('web')
-});
-
-router.post('/web', (req, res) => {
- let {
- nombre,
- documento
- } = req.body;
- let nuevoRegistro = {
- nombre,
- documento,
- fecha: new Date()
- };
- alumnos.push(nuevoRegistro);
- res.redirect("/");
-});
router.get('/free', (req, res) => {
var sys = require('sys')
+++ /dev/null
-<!DOCTYPE html>
-<html>
-
-<head>
- <title>Register new</title>
- <%include ../../partials/head%>
-</head>
-
-<body>
- <header>
- <%include ../../partials/header%>
- </header>
- <div id="container" class="container">
- <div class="col-xs-8 col-xs-offset-2">
- <h2 class="text-center">Nuevo registro</h2>
- <form method="post" role="form">
- <div class="form-group">
- <label for="nombre">Nombre completo</label>
- <input class="form-control" type="text" name="nombre" placeholder="Nombre completo">
- </div>
- <div class="form-group">
- <label for="documento">Numero de documento</label>
- <input type="text" name="documento" class="form-control" placeholder="Numero de documento">
- </div>
- <div class="form-group">
- <button class="btn btn-primary">Registrar</button>
- </div>
- </form>
- </div>
- </div>
-</body>
-<%include ../../partials/footer%>
-
-</html>
\ No newline at end of file