Type editor and schema viewer. Poppables and help icon
This commit is contained in:
15
warstone-web-service/Dockerfile
Normal file
15
warstone-web-service/Dockerfile
Normal 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"]
|
24
warstone-web-service/main.ts
Normal file
24
warstone-web-service/main.ts
Normal 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));
|
2
warstone-web-service/perms
Normal file
2
warstone-web-service/perms
Normal file
@@ -0,0 +1,2 @@
|
||||
--allow-read
|
||||
--allow-net
|
1
warstone-web-service/port
Normal file
1
warstone-web-service/port
Normal file
@@ -0,0 +1 @@
|
||||
6904
|
0
warstone-web-service/prefix
Normal file
0
warstone-web-service/prefix
Normal file
Reference in New Issue
Block a user