From c63997ab20cc0f51009d8d19cc7b9178265e9711 Mon Sep 17 00:00:00 2001 From: "Oscar J. Rodriguez B" Date: Thu, 19 Sep 2019 10:50:58 -0400 Subject: [PATCH] Router mods --- partials/header.ejs | 4 +- src/index.js | 3 +- src/routes/index.js | 25 ++++-- src/views/flex.ejs | 196 ------------------------------------------ src/views/starter.ejs | 20 +++++ 5 files changed, 43 insertions(+), 205 deletions(-) delete mode 100644 src/views/flex.ejs diff --git a/partials/header.ejs b/partials/header.ejs index 60da6db..87fc2e3 100644 --- a/partials/header.ejs +++ b/partials/header.ejs @@ -21,13 +21,13 @@ but hey, it's pure CSS magic. -->
diff --git a/src/index.js b/src/index.js index c598b02..e26f9e4 100644 --- a/src/index.js +++ b/src/index.js @@ -14,8 +14,9 @@ app.use(express.urlencoded({ extended: false })); app.use(express.json()); -//para que la ruta de estilos sea visible +//para que la ruta de estilos y js sea visible app.use('/styles', express.static('styles')); +app.use('/js', express.static('js')); //rutas app.use(require('./routes/index')); diff --git a/src/routes/index.js b/src/routes/index.js index 0edbab6..3eb3ba4 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -3,19 +3,32 @@ const { } = require('express'); const router = new Router(); -let alumnos = []; +//renders de las paginas web router.get("/", (req, res) => { - res.render("index", { - alumnos - }) + res.render("index") }); -router.get("/flex", (req, res) => { - res.render("flex") +router.get("/access", (req, res) => { + res.render("access") }); +router.get("/starter", (req, res) => { + res.render("starter") +}); + +router.get("/stats", (req, res) => { + res.render("stats") +}); +router.get("/topology", (req, res) => { + res.render("topology") +}); + +router.get("/topologyMaker", (req, res) => { + res.render("topologyMaker") +}); +//en lo adelante se encuentran las peticiones de datos router.get('/free', (req, res) => { var sys = require('sys') var exec = require('child_process').exec; diff --git a/src/views/flex.ejs b/src/views/flex.ejs deleted file mode 100644 index 0e49d95..0000000 --- a/src/views/flex.ejs +++ /dev/null @@ -1,196 +0,0 @@ - - - - - Oscar Rodriguez - - - - - - - - - - -
-

Oscar J. Rodriguez B.

- -
- - -
-
-

About Me

-
Photo of me:
-
Image
-

Some text about me in culpa qui officia deserunt mollit anim..

-

More Text

-

Lorem ipsum dolor sit ame.

-
Image

-
Image

-
Image
-
-
-

TITLE HEADING

-
Title description, Dec 7, 2017
-
Image
-

Some text..

-

Sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.

-
-

TITLE HEADING

-
Title description, Sep 2, 2017
-
Image
-

Some text..

-

Sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.

-
-
- - - - - - - \ No newline at end of file diff --git a/src/views/starter.ejs b/src/views/starter.ejs index e69de29..a160864 100644 --- a/src/views/starter.ejs +++ b/src/views/starter.ejs @@ -0,0 +1,20 @@ + + + + + + + <%include ../../partials/head%> + + + +
+ <%include ../../partials/header%> +
+ + + + + -- 2.25.1