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.
Files changed (3) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
  3. package/server.js +3 -13
package/index.js CHANGED
@@ -6,7 +6,7 @@ module.exports = {
6
6
  },
7
7
  data: require("./models"),
8
8
  chat: null,
9
- start: function (world) {
9
+ start: function start(world) {
10
10
  let theFront = require("./controllers/the-front");
11
11
  let explorer = require("./controllers/explorer");
12
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notherbase-fs",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "description": "Functions to help make developing for NotherBase easier.",
5
5
  "main": "index.js",
6
6
  "scripts": {
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", theFront);
63
+ app.use("/the-front", frontRouter);
65
64
 
66
- app.use("/", controllers.authCheck, explorer);
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
  }