Skip to content

Commit

Permalink
Merge pull request #5 from lassejlv/development
Browse files Browse the repository at this point in the history
changes
  • Loading branch information
lassejlv authored Dec 9, 2024
2 parents 7aa01b7 + 2a35ff8 commit 6022f4e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Pool } from 'pg'
import { z } from 'zod'
import { logger } from 'hono/logger'
import { bearerAuth } from 'hono/bearer-auth'
import { cors } from 'hono/cors'

export const pool = new Pool({
connectionString: process.env.DATABASE_URL,
Expand All @@ -17,8 +18,10 @@ const token = process.env.API_KEY;
if (!token) throw new Error('API_KEY is required')

app.use(logger())
app.use("*", cors({ origin: "*" }))
app.use("*", bearerAuth({ token }))


const schema = z.object({
query: z.string(),
args: z.array(z.any()).optional(),
Expand Down
8 changes: 4 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"compilerOptions": {
// Enable latest features
"lib": ["ESNext", "DOM"],
"lib": [
"ESNext",
"DOM"
],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,

// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,

// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,

// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
Expand Down

0 comments on commit 6022f4e

Please sign in to comment.