silverbullet/plugs/core/server.ts

18 lines
348 B
TypeScript
Raw Normal View History

2022-03-23 22:41:12 +08:00
import {
EndpointRequest,
EndpointResponse,
2022-03-27 17:31:12 +08:00
} from "../../plugos/feature/endpoint";
2022-03-21 22:21:34 +08:00
export function endpointTest(req: EndpointRequest): EndpointResponse {
console.log("I'm running on the server!", req);
return {
status: 200,
body: "Hello world!",
};
}
export function welcome() {
2022-03-23 22:41:12 +08:00
console.log("Hello world!");
2022-03-25 19:03:06 +08:00
return "hi";
}