Get base files closer to being bootstrappable

This commit is contained in:
2026-02-08 09:19:27 -05:00
parent 98f1f554c1
commit 82e87577cc
10 changed files with 177 additions and 114 deletions

21
backend/handlers.ts Normal file
View File

@@ -0,0 +1,21 @@
// This is a sample file provided by diachron. You are encouraged to modify it.
import { contentTypes } from "./diachron/content-types";
import { core } from "./diachron/core";
import { httpCodes } from "./diachron/http-codes";
import type { Call, Handler, Result } from "./diachron/types";
const multiHandler: Handler = async (call: Call): Promise<Result> => {
const code = httpCodes.success.OK;
const rn = core.random.randomNumber();
const retval: Result = {
code,
result: `that was ${call.method} (${rn})`,
contentType: contentTypes.text.plain,
};
return retval;
};
export { multiHandler };