Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/crutchcorn/full-stack-safety. A demo app that has fully type safe handling between FE and BE
Something went wrong. Try again.
505 B · 24 lines
TypeScript
at main
12345678910111213141516171819202122232425import { serve } from '@hono/node-server'import { openAPIRouteHandler } from 'hono-openapi'import { Scalar } from '@scalar/hono-api-reference'import { app } from './shared.ts'import { openAPIOptions } from './constants/open-api.ts'
app.get('/openapi', openAPIRouteHandler(app, openAPIOptions))
app.get( '/docs', Scalar({ theme: 'saturn', url: '/openapi', }),)
const PORT = 3030
serve({ fetch: app.fetch, port: PORT,})
console.log(`Server running at http://localhost:${PORT}`)