restructure server

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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