From d40832be5a7ed57fe026a9a3fcbe0f99445613b4 Mon Sep 17 00:00:00 2001 From: mlw6 Date: Mon, 11 Jan 2021 10:34:32 -0600 Subject: [PATCH] Add vercel.json back in --- vercel.json | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 vercel.json diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..54b2fb8 --- /dev/null +++ b/vercel.json @@ -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" } + ] +} + + +