|
|
@@ -1,5 +1,5 @@
|
|
|
const controller = require("./controller.js");
|
|
|
-const images = require("./images.js");
|
|
|
+const travel = require("./travel.js");
|
|
|
|
|
|
module.exports = function(app){
|
|
|
let views = `${__dirname}/views`;
|
|
|
@@ -7,14 +7,12 @@ module.exports = function(app){
|
|
|
//MAIN
|
|
|
app.get("/", (req, res)=>{res.sendFile(`${views}/main/index.html`)});
|
|
|
app.get("/style", (req, res)=>{res.sendFile(`${views}/main/index.css`)});
|
|
|
- app.get("/getimages", images.listDirectories);
|
|
|
|
|
|
//WRITING
|
|
|
app.get("/writing/style", (req, res)=>{res.sendFile(`${views}/writing/index.css`)});
|
|
|
app.get("/writing/code", (req, res)=>{res.sendFile(`${views}/writing/index.js`)});
|
|
|
app.get("/writing/comments/:article", controller.getComments);
|
|
|
app.post("/writing/comments", controller.createComment);
|
|
|
-
|
|
|
app.get("/writing/touchscreens", (req, res)=>{res.sendFile(`${views}/writing/touchscreens.html`)});
|
|
|
|
|
|
//IMAGES
|
|
|
@@ -25,8 +23,6 @@ module.exports = function(app){
|
|
|
app.get("/images/birthday", (req, res)=>{res.sendFile(`${views}/images/birthday.jpg`)});
|
|
|
app.get("/images/market", (req, res)=>{res.sendFile(`${views}/images/market.jpeg`)});
|
|
|
|
|
|
- app.get("/video/plane", (req, res)=>{res.sendFile(`${views}/videos/planeEdit.mp4`)});
|
|
|
-
|
|
|
//SUDOKU
|
|
|
app.get("/sudoku", (req, res)=>{res.sendFile(`${views}/sudoku/index.html`)});
|
|
|
app.get("/sudoku/style", (req, res)=>{res.sendFile(`${views}/sudoku/index.css`)});
|
|
|
@@ -36,4 +32,9 @@ module.exports = function(app){
|
|
|
app.get("/birthdayparadox", (req, res)=>{res.sendFile(`${views}/birthdayParadox/index.html`)});
|
|
|
app.get("/birthdayparadox/style", (req, res)=>{res.sendFile(`${views}/birthdayParadox/index.css`)});
|
|
|
app.get("/birthdayparadox/code", (req, res)=>{res.sendFile(`${views}/birthdayParadox/index.js`)});
|
|
|
+
|
|
|
+ //TRAVEL
|
|
|
+ app.get("/travel/directories", travel.listDirectories);
|
|
|
+ app.get("/travel/images/*", travel.getImages);
|
|
|
+ app.get("/travel/*", (req, res)=>res.sendFile(`${views}/travel/index.html`));
|
|
|
}
|