notherbase-fs 1.1.5 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/controllers/explorer.js +2 -2
- package/controllers/the-front.js +2 -2
- package/models/start-mongoose.js +2 -3
- package/package.json +1 -1
- package/server.js +5 -1
package/controllers/explorer.js
CHANGED
|
@@ -50,10 +50,10 @@ let complete = function complete(explorerBuild) {
|
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
detail.options.main = "index";
|
|
53
|
-
if (detail.
|
|
53
|
+
if (detail.name !== "") detail.options.main = detail.name;
|
|
54
54
|
detail.options.main = `${currentDir}/views/${detail.options.main}`;
|
|
55
55
|
|
|
56
|
-
router.get(`${currentDir}/${detail.
|
|
56
|
+
router.get(`${currentDir}/${detail.name}`, async function(req, res) {
|
|
57
57
|
try {
|
|
58
58
|
const foundInventory = await inventory.findOne({ user: req.session.currentUser }).populate("items.item");
|
|
59
59
|
|
package/controllers/the-front.js
CHANGED
|
@@ -27,10 +27,10 @@ let front = function front(detail) {
|
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
detail.options.main = "index";
|
|
30
|
-
if (detail.
|
|
30
|
+
if (detail.name !== "") detail.options.main = detail.name;
|
|
31
31
|
detail.options.main = `${dir}/views/${detail.options.main}`;
|
|
32
32
|
|
|
33
|
-
router.get(`/${detail.
|
|
33
|
+
router.get(`/${detail.name}`, async function(req, res) {
|
|
34
34
|
try {
|
|
35
35
|
const foundInventory = await inventory.findOne({ user: req.session.currentUser }).populate("items.item");
|
|
36
36
|
|
package/models/start-mongoose.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
require("dotenv").config();
|
|
1
2
|
const mongoose = require("mongoose");
|
|
2
3
|
|
|
3
4
|
//connect mongoose and mongo
|
|
4
5
|
mongoose.connect(process.env.MONGODB_URI, {
|
|
5
6
|
useNewUrlParser: true,
|
|
6
|
-
useUnifiedTopology: true
|
|
7
|
-
useCreateIndex: true,
|
|
8
|
-
useFindAndModify: false,
|
|
7
|
+
useUnifiedTopology: true
|
|
9
8
|
});
|
|
10
9
|
|
|
11
10
|
//handlers
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -66,7 +66,11 @@ function start() {
|
|
|
66
66
|
app.use("/", controllers.authCheck, explorer);
|
|
67
67
|
|
|
68
68
|
// Go Off (On)
|
|
69
|
-
server.listen(process.env.PORT)
|
|
69
|
+
server.listen(process.env.PORT, function () {
|
|
70
|
+
console.log(`Server started at ${process.env.PORT}`);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
console.log(`Server`);
|
|
70
74
|
|
|
71
75
|
started = true;
|
|
72
76
|
}
|