From 7ff1d8299574dd142ea38091e28ad5c2941b2427 Mon Sep 17 00:00:00 2001 From: Rafael Marçalo Date: Sun, 23 Oct 2022 02:25:00 +0100 Subject: Fixed up paths for electron --- app.js | 7 ++++--- package.json | 9 ++++----- 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 -- cgit v1.2.3