Created
March 18, 2021 06:00
-
-
Save kunxin-chor/33fb86dafd6dcecc46db39e485d88c7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const hbs = require("hbs"); | |
const wax = require("wax-on"); | |
const mysql = require("mysql2/promise"); | |
let app = express(); | |
app.set("view engine", "hbs"); | |
app.use(express.static("public")); | |
wax.on(hbs.handlebars); | |
wax.setLayoutPath("./views/layouts"); | |
app.use(express.urlencoded({ extended: false })); | |
require("handlebars-helpers")({ | |
handlebars: hbs.handlebars, | |
}); | |
// ROUTES BEGIN HERE | |
app.listen(3000, () => { | |
console.log("Server started"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment