generated from willin/turbo-mono-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
59 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
"@hono-dev/zod-openapi-decorators": patch | ||
"@hono-dev/zod-body-validator": patch | ||
"@shared/typescript-config": patch | ||
"@hono-dev/zod-openapi": patch | ||
"@shared/eslint-config": patch | ||
"@hono-dev/powered-by": patch | ||
"@shared/hono-app": patch | ||
--- | ||
|
||
init mvp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,37 @@ | ||
import { Hono } from 'hono'; | ||
import { cors } from 'hono/cors'; | ||
import { timing } from 'hono/timing'; | ||
|
||
const app = new Hono(); | ||
const app = new Hono({ | ||
strict: false | ||
}); | ||
|
||
export default app; | ||
app.use( | ||
'*', | ||
timing({ | ||
totalDescription: false, | ||
crossOrigin: true | ||
}) | ||
); | ||
|
||
app.use( | ||
'*', | ||
cors({ | ||
origin: '*', | ||
credentials: true, | ||
exposeHeaders: [ | ||
'content-length', | ||
'x-powered-by', | ||
'timing-allow-origin', | ||
'server-timing' | ||
], | ||
maxAge: 3600 | ||
}) | ||
); | ||
|
||
export function getVersion(pkg: unknown) { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return | ||
return typeof pkg === 'object' ? pkg?.version : 'unknown'; | ||
} | ||
|
||
export { app }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"extends": "@shared/typescript-config/tsconfig.base.json", | ||
"include": ["src/**/*.ts"], | ||
"include": ["src/**/*.ts", "package.json"], | ||
"exclude": ["node_modules"] | ||
} |