UNPKG

@prism-engineer/router

Version:

Type-safe Express.js router with automatic client generation

24 lines 693 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.helloRoute = void 0; const createApiRoute_1 = require("../../../../createApiRoute"); const typebox_1 = require("@sinclair/typebox"); exports.helloRoute = (0, createApiRoute_1.createApiRoute)({ path: '/api/hello', method: 'GET', response: { 200: { contentType: 'application/json', body: typebox_1.Type.Object({ message: typebox_1.Type.String() }) } }, handler: async (req) => { return { status: 200, body: { message: 'Hello, World!' } }; } }); //# sourceMappingURL=hello.js.map