Skip to content

Instantly share code, notes, and snippets.

@leomelzer
Created January 8, 2019 09:27
Show Gist options
  • Save leomelzer/c52173deaf1adc13c6e87c1676937238 to your computer and use it in GitHub Desktop.
Save leomelzer/c52173deaf1adc13c6e87c1676937238 to your computer and use it in GitHub Desktop.
now.json file with routing rules for a Create-React-App.
{
"version": 2,
"name": "jetztein",
"alias": "jetztein.de",
"builds": [{ "src": "package.json", "use": "@now/static-build" }],
"regions": ["bru"],
"routes": [
{ "src": "^/static/(.*)", "dest": "/static/$1" },
{ "src": "^/favicon.ico", "dest": "/favicon.ico" },
{ "src": "^/asset-manifest.json", "dest": "/asset-manifest.json" },
{ "src": "^/manifest.json", "dest": "/manifest.json" },
{ "src": "^/service-worker.js", "headers": { "cache-control": "s-maxage=0" }, "dest": "/service-worker.js" },
{ "src": "^/precache-manifest.(.*)", "dest": "/precache-manifest.$1" },
{ "src": "^/(.*)", "dest": "/index.html" }
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment