From 62240e8370e6bc656a17eaef595275a92020a617 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 24 Oct 2022 23:39:27 +0200 Subject: Added favicon, split view in multiple parts --- main.js | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) (limited to 'main.js') diff --git a/main.js b/main.js index b4b626b..2765c83 100644 --- a/main.js +++ b/main.js @@ -1,36 +1,14 @@ import express from "express"; -export const app = express(); +import playRouter from "./routes/play.js"; + +const app = express(); app.set("views", "./views"); app.set("view engine", "ejs"); -let CWDATA = { - board: [ - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ], - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ], - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ], - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ], - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ], - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ], - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ], - [ "", "", "", "", "","", "", "T", "E", "S","T", "", "", "", "" ], - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ], - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ], - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ], - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ], - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ], - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ], - [ "", "", "", "", "","", "", "", "", "","", "", "", "", "" ] - ], - letters: [ "A", "B", "C", "D", "E", "F", "JOKER" ] -}; - -app.get("/", (req, res) => { - return res.render("index", {CWDATA: CWDATA}); -}); - app.use(express.static("static")); +app.use("/play", playRouter); const port = process.env.PORT || 3000; app.listen(port, () => console.log(`listening on port ${port}`)); -- cgit v1.2.3