summaryrefslogtreecommitdiff
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
parentfab80a4d43b39839e67e762da19fdb7f9a53502f (diff)
Fixed up paths for electron
-rw-r--r--app.js7
-rw-r--r--package.json9
2 files changed, 8 insertions, 8 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");
diff --git a/package.json b/package.json
index ccdf53f..6b2b613 100644
--- a/package.json
+++ b/package.json
@@ -2,10 +2,10 @@
"name": "sneedbay",
"version": "1.0.0",
"description": "Piratebay indexing tool",
- "main": "app.js",
+ "main": "launch.js",
"scripts": {
"start": "electron launch.js",
- "dev": "nodemon app.js"
+ "dev": "node app.js"
},
"keywords": [
"piratebay",
@@ -22,7 +22,6 @@
"express": "^4.18.2"
},
"devDependencies": {
- "electron": "^21.2.0",
- "nodemon": "^2.0.20"
+ "electron": "^21.2.0"
}
-}
+} \ No newline at end of file