Skip to content

Instantly share code, notes, and snippets.

@kunxin-chor
Created March 18, 2021 06:00
Show Gist options
  • Save kunxin-chor/33fb86dafd6dcecc46db39e485d88c7d to your computer and use it in GitHub Desktop.
Save kunxin-chor/33fb86dafd6dcecc46db39e485d88c7d to your computer and use it in GitHub Desktop.
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