Type editor and schema viewer. Poppables and help icon

This commit is contained in:
Emma
2023-06-11 10:25:32 -06:00
parent 42c0004150
commit b951d1970d
36 changed files with 1190 additions and 77 deletions

View File

@@ -0,0 +1,15 @@
FROM denoland/deno:1.33.2
EXPOSE 6904
WORKDIR /warstone-web
ADD ./warstone-web-service/ .
ADD ./deno.jsonc .
ADD ./secrets.json .
ADD ./key.txt .
ADD ./common ./common
ADD ./lib ./lib
ADD ./middleware ./middleware
CMD ["run", "[object Object]", "[object Object]", main.ts, "6904"]

View File

@@ -0,0 +1,24 @@
import { CGGService } from 'cgg/Application.ts';
import { Router, send } from 'oak';
const app = new CGGService({ prefix: '/' });
// app.route(new Router()
// .get('/', ctx => ctx.response.body = 'warstone-web service')
// );
const ROOT_DIR = "./public/testdata", ROOT_DIR_PATH = "/public";
app.use(async (ctx, next) => {
if (!ctx.request.url.pathname.startsWith(ROOT_DIR_PATH)) {
next();
return;
}
const filePath = ctx.request.url.pathname.replace(ROOT_DIR_PATH, "");
await send(ctx, filePath, {
root: ROOT_DIR,
});
});
app.start();
console.log('warstone-web service running on ' + Deno.args.at(0));

View File

@@ -0,0 +1,2 @@
--allow-read
--allow-net

View File

@@ -0,0 +1 @@
6904

View File