silverbullet/plugs/core/server.ts

18 lines
413 B
TypeScript
Raw Normal View History

import { EndpointRequest, EndpointResponse } from "../../plugos/hooks/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!",
};
}
2022-03-28 14:51:24 +08:00
export function welcome(plugName: string) {
if (plugName !== "core") {
return;
}
console.log("Hello world!!", plugName);
2022-03-25 19:03:06 +08:00
return "hi";
}