summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorRafael Marçalo <raroma09@gmail.com>2022-10-23 02:25:00 +0100
committerRafael Marçalo <raroma09@gmail.com>2022-10-23 02:25:00 +0100
commit7ff1d8299574dd142ea38091e28ad5c2941b2427 (patch)
tree1f777b95e088ea440dc0b9b0970b0e5431f102ea /app.js
parentfab80a4d43b39839e67e762da19fdb7f9a53502f (diff)
Fixed up paths for electron
Diffstat (limited to 'app.js')
-rw-r--r--app.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/app.js b/app.js
index d5e08a6..04ea216 100644
--- a/app.js
+++ b/app.js
@@ -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");