Json-server + Next.js 14 deploy to Vercel
Hey Guys,
Need help with deploying Next.js 14 app with json-server to vercel. I found some article about deploying only json-server and after some try still getting 404. https://trip-chakra.vercel.app/ .
Do you know how to configure vercel.json to also build next.js app front end ?
Json server - https://github.com/typicode/json-server
Any help will be appreciate.
vercel.json
{
"version": 2,
"builds": [
{
"src": "server.js",
"use": "@vercel/node",
"config": {
"includeFiles": ["db.json"]
}
}
],
"routes": [
{
"src": "/(.*)",
"dest": "server.js"
}
]
}
https://ivo-culic.medium.com/create-restful-api-with-json-server-and-deploy-it-to-vercel-d56061c1157a
Need help with deploying Next.js 14 app with json-server to vercel. I found some article about deploying only json-server and after some try still getting 404. https://trip-chakra.vercel.app/ .
Do you know how to configure vercel.json to also build next.js app front end ?
Json server - https://github.com/typicode/json-server
Any help will be appreciate.
vercel.json
{
"version": 2,
"builds": [
{
"src": "server.js",
"use": "@vercel/node",
"config": {
"includeFiles": ["db.json"]
}
}
],
"routes": [
{
"src": "/(.*)",
"dest": "server.js"
}
]
}
https://ivo-culic.medium.com/create-restful-api-with-json-server-and-deploy-it-to-vercel-d56061c1157a
GitHub
Get a full fake REST API with zero coding in less than 30 seconds (seriously) - typicode/json-server
Medium
Sometimes you need to create or mock up an API that you can play and test while developing your application. The data does not need to be…