Skip to content

Commit

Permalink
Prepare for vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
codingforentrepreneurs committed Jan 27, 2024
1 parent 640eb24 commit 74c721d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { app } from '../src/index'

export default app
Empty file added public/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>Hello World</h1>
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ app.use((req, res, next) => {
// console.log("running at http://localhost:3000")
// })

module.exports.app = app
module.exports.handler = serverless(app);
8 changes: 8 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"rewrites": [
{
"source": "/api(.*)",
"destination": "/api"
}
]
}

0 comments on commit 74c721d

Please sign in to comment.