restructure server

This commit is contained in:
Martin McKeaveney 2020-04-03 17:35:20 +01:00
parent b54d9c1f3c
commit 2c03ac761c
6 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,5 @@
const Koa = require("koa")
const router = require("./middleware/routers")
const router = require("./middleware/routes/builderRouter")
const koaBody = require("koa-body")
const initialiseRuntimePackages = require("./initialise/initialiseRuntimePackages")

View File

@ -2,7 +2,8 @@ const Router = require("@koa/router");
const {
getPackageForBuilder,
getApps,
} = require("../utilities/builder")
} = require("../../utilities/builder")
const router = Router();

View File

@ -1,4 +1,4 @@
const Router = require("koa-router");
const Router = require("@koa/router");
const routeHandlers = require("../routeHandlers")
const router = Router();

View File

@ -1,9 +1,9 @@
const Router = require("@koa/router")
const session = require("./session")
const StatusCodes = require("../utilities/statusCodes")
const session = require("../session")
const StatusCodes = require("../../utilities/statusCodes")
const { resolve } = require("path")
const send = require("koa-send")
const routeHandlers = require("./routeHandlers")
const routeHandlers = require("../routeHandlers")
const {
componentRoutes,
appsRoutes,

View File

@ -1,4 +1,4 @@
const Router = require("koa-router");
const Router = require("@koa/router");
const send = require("koa-send")
const {
getComponentDefinitions,

View File

@ -1,4 +1,3 @@
const screenRoutes = require("./screens");
const pageRoutes = require("./pages");
const componentRoutes = require("./components");
const userRoutes = require("./user");
@ -6,9 +5,9 @@ const appsRoutes = require("./apps");
const authenticatedRoutes = require("./authenticated");
module.exports = {
screenRoutes,
pageRoutes,
componentRoutes,
authRoutes,
appsRoutes
appsRoutes,
userRoutes,
authenticatedRoutes
};