Skip to content

Commit

Permalink
Refactor view engine and static file path
Browse files Browse the repository at this point in the history
configuration
  • Loading branch information
Pranavtej committed Nov 28, 2023
1 parent cc2741e commit fad44cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const bodyParser = require("body-parser");
const e = require('express');
const app = express();

app.set("view-engine","ejs");
app.engine('ejs', require('ejs').__express);
app.use(express.static(__dirname+'/public'))
app.set("views", __dirname + "/views");
app.set("view engine", "ejs");
app.use(express.static(__dirname + "public"));
app.use(bodyParser.urlencoded({ extended: true }));

const defaultSessionSecret = 'mydefaultsecretkey';
Expand Down

0 comments on commit fad44cb

Please sign in to comment.