diff options
author | Julien Dessaux | 2022-10-24 23:39:27 +0200 |
---|---|---|
committer | Julien Dessaux | 2022-10-24 23:39:27 +0200 |
commit | 62240e8370e6bc656a17eaef595275a92020a617 (patch) | |
tree | e83e4f83c46671457052f35aebc9463bc4fb61f0 /main.js | |
parent | Get started with ejs templating (diff) | |
download | jeux-de-mots-62240e8370e6bc656a17eaef595275a92020a617.tar.gz jeux-de-mots-62240e8370e6bc656a17eaef595275a92020a617.tar.bz2 jeux-de-mots-62240e8370e6bc656a17eaef595275a92020a617.zip |
Added favicon, split view in multiple parts
Diffstat (limited to '')
-rw-r--r-- | main.js | 30 |
1 files changed, 4 insertions, 26 deletions
@@ -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}`)); |