diff options
author | Julien Dessaux | 2022-10-23 23:29:46 +0200 |
---|---|---|
committer | Julien Dessaux | 2022-10-23 23:29:46 +0200 |
commit | cd33314d50986c5b143bf579d47f5ffdbe922e0f (patch) | |
tree | 1d90e2656f968a919dd4fa3f6063f0baf6ffb9f8 /main.js | |
parent | Began writing an express backend (diff) | |
download | jeux-de-mots-cd33314d50986c5b143bf579d47f5ffdbe922e0f.tar.gz jeux-de-mots-cd33314d50986c5b143bf579d47f5ffdbe922e0f.tar.bz2 jeux-de-mots-cd33314d50986c5b143bf579d47f5ffdbe922e0f.zip |
Get started with ejs templating
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 25 |
1 files changed, 23 insertions, 2 deletions
@@ -5,11 +5,32 @@ export 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", {}); + return res.render("index", {CWDATA: CWDATA}); }); app.use(express.static("static")); const port = process.env.PORT || 3000; -app.listen(port, () => console.log(`listening on port ${port}!`)); +app.listen(port, () => console.log(`listening on port ${port}`)); |