Skip to content

Commit

Permalink
Add vercel.json back in
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwalo32 committed Jan 11, 2021
1 parent 157b6fc commit d40832b
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"regions": ["iad1"],
"build": {
"env": {
"BACKEND_URL": "@mern_template_backend_url"
}
},
"env": {
"MONGO_URL": "@mern_template_db_url"
},
"builds": [
{ "src": "api/src/app.js", "use": "@now/node" },
{
"src": "client/package.json",
"use": "@now/static-build",
"config": { "distDir": "build" }
}
],
"routes": [
{
"src": "/api/(.*)",
"headers": { "cache-control": "s-maxage=0" },
"dest": "api/src/app.js"
},
{
"src": "/static/(.*)",
"headers": { "cache-control": "s-maxage=31536000, immutable" },
"dest": "client/static/$1"
},
{ "src": "/favicon.ico", "dest": "client/favicon.ico" },
{
"src": "/asset-manifest.json",
"dest": "client/asset-manifest.json"
},
{
"src": "/precache-manifest.(.*)",
"dest": "client/precache-manifest.$1"
},
{ "src": "/manifest.json", "dest": "client/manifest.json" },
{
"src": "/service-worker.js",
"headers": { "cache-control": "s-maxage=0" },
"dest": "client/service-worker.js"
},
{ "src": "/(.*)", "dest": "client/index.html" }
]
}



1 comment on commit d40832b

@vercel
Copy link

@vercel vercel bot commented on d40832b Jan 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.