notherbase-fs 1.1.9 → 1.1.10
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/index.js +1 -1
- package/package.json +1 -1
- package/server.js +3 -13
package/index.js
CHANGED
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
let started = false;
|
|
2
|
-
let theFront, explorer = null;
|
|
3
2
|
|
|
4
|
-
function start() {
|
|
3
|
+
module.exports = function start(frontRouter, exploreRouter) {
|
|
5
4
|
if (!started) {
|
|
6
5
|
// Setup for Express
|
|
7
6
|
const express = require("express");
|
|
@@ -61,25 +60,16 @@ function start() {
|
|
|
61
60
|
|
|
62
61
|
app.use("/item", controllers.item);
|
|
63
62
|
|
|
64
|
-
app.use("/the-front",
|
|
63
|
+
app.use("/the-front", frontRouter);
|
|
65
64
|
|
|
66
|
-
app.use("/", controllers.authCheck,
|
|
65
|
+
app.use("/", controllers.authCheck, exploreRouter);
|
|
67
66
|
|
|
68
67
|
// Go Off (On)
|
|
69
68
|
server.listen(process.env.PORT, function () {
|
|
70
69
|
console.log(`Server started at ${process.env.PORT}`);
|
|
71
70
|
});
|
|
72
71
|
|
|
73
|
-
console.log(`Server`);
|
|
74
|
-
|
|
75
72
|
started = true;
|
|
76
73
|
}
|
|
77
74
|
else console.log("Server already started!");
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
module.exports = function set(frontRouter, exploreRouter) {
|
|
81
|
-
theFront = frontRouter;
|
|
82
|
-
explorer = exploreRouter;
|
|
83
|
-
|
|
84
|
-
return start;
|
|
85
75
|
}
|