Cleanup and progress
This commit is contained in:
@@ -36,8 +36,16 @@
|
||||
"events": {
|
||||
"page:click": ["taskToggle", "clickNavigate"],
|
||||
"editor:complete": ["pageComplete"],
|
||||
"page:index": ["indexLinks"]
|
||||
}
|
||||
"page:index": ["indexLinks"],
|
||||
"load": ["welcome"]
|
||||
},
|
||||
"endpoints": [
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/",
|
||||
"handler": "endpointTest"
|
||||
}
|
||||
]
|
||||
},
|
||||
"functions": {
|
||||
"indexLinks": {
|
||||
@@ -76,8 +84,11 @@
|
||||
"toggle_h2": {
|
||||
"path": "./markup.ts:toggleH2"
|
||||
},
|
||||
"server_test": {
|
||||
"path": "./server.ts:test"
|
||||
"endpointTest": {
|
||||
"path": "./server.ts:endpointTest"
|
||||
},
|
||||
"welcome": {
|
||||
"path": "./server.ts:welcome"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
-4
@@ -1,5 +1,15 @@
|
||||
import { syscall } from "./lib/syscall";
|
||||
export function test() {
|
||||
console.log("I'm running on the server!");
|
||||
return 5;
|
||||
import { EndpointRequest, EndpointResponse } from "../../plugbox/endpoints";
|
||||
|
||||
export function endpointTest(req: EndpointRequest): EndpointResponse {
|
||||
console.log("I'm running on the server!", req);
|
||||
return {
|
||||
status: 200,
|
||||
body: "Hello world!",
|
||||
};
|
||||
}
|
||||
|
||||
export function welcome() {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
console.log("Welcome to you all!!!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user