Skip to content

Commit

Permalink
fixed cors error
Browse files Browse the repository at this point in the history
  • Loading branch information
lucky29-git committed Sep 8, 2024
1 parent 7edbc78 commit 58d6f17
Show file tree
Hide file tree
Showing 25 changed files with 2,224 additions and 172 deletions.
8 changes: 8 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": [
"development"
],
"hints": {
"typescript-config/strict": "off"
}
}
9 changes: 7 additions & 2 deletions backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ import { userRouter } from './routes/user'
import { blogRouter } from './routes/blog'
import { cors } from 'hono/cors'

const app = new Hono()
const app = new Hono<{
Bindings : {
DATABASE_URL : string,
JWT_SECRET : string
}
}>()

app.get('/*', cors())
app.use('/*', cors())

app.route("/api/v1/user", userRouter)
app.route("/api/v1/blog", blogRouter)
Expand Down
2 changes: 1 addition & 1 deletion backend/wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "backend"
name = "vichar-backend"
compatibility_date = "2024-08-25"

# [vars]
Expand Down
17 changes: 17 additions & 0 deletions frontend/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/index.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
Loading

0 comments on commit 58d6f17

Please sign in to comment.