diff options
author | Rafael Marçalo <raroma09@gmail.com> | 2022-10-23 02:25:00 +0100 |
---|---|---|
committer | Rafael Marçalo <raroma09@gmail.com> | 2022-10-23 02:25:00 +0100 |
commit | 7ff1d8299574dd142ea38091e28ad5c2941b2427 (patch) | |
tree | 1f777b95e088ea440dc0b9b0970b0e5431f102ea /app.js | |
parent | fab80a4d43b39839e67e762da19fdb7f9a53502f (diff) |
Fixed up paths for electron
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,18 +1,19 @@ "use strict"; // handling imports -const express = require('express'); const bodyParser = require('body-parser'); +const express = require('express'); +const path = require('path'); const app = express(); const PORT = module.exports.PORT = process.env.PORT || 3000; - // set the public folder to public acess and added a body parser -app.use(express.static('public')); +app.use(express.static(path.join(__dirname, '/public'))); app.use(bodyParser.urlencoded({extended: true})); // set the view engine to ejs app.set('view engine', 'ejs'); +app.set('views', path.join(__dirname, '/views')); // routes management const home = require("./routes/home"); |