Guest User

Untitled

a guest
Jun 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. const express = require("express");
  2. const path = require("path");
  3.  
  4. const app = express();
  5. app.set("views", path.join(__dirname, "views"));
  6. app.set("view engine", "hbs");
  7.  
  8. app.get("/", (req, res) => res.render("index")); // renders views/index.hbs
  9.  
  10. app.listen(process.env.PORT || 3000, () => console.log("started"));
Add Comment
Please, Sign In to add comment