Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Option Description
version We'll use the (current) version 2 of the Now platform. Version 1 will be deprecated in the future but is still fully supported. Since the platform versions are based on different concepts, the specific options are different, too.
name The name of the application, usually the same as in package.json. This will be used as a label in the Now UI to identify the application.
alias This is the default argument for the now alias command. The alias will point to the randomly generated subdomain where Now created your immutable deployment. You must add the domain to Now in order to use this feature. You may add multiple aliases and also use subdomains here (e.g. foo.example.org if you already added the domain example.org to Now).
builds A Now application may be deployed using any of the available builders such as for Node.js, Go, Python and so on. We'll use the static-build builder since we can compile the Create-React-App to static assets.
regions We are based in Germany and expect our users to be so, too, hence choose a region close to us for best performance. This is Brussels (bru) in our case. Please see the available regions for more information. Usually there is no need to pin the regions since Now will lookup the location of your IP and use the datacenter closest to that automatically. But since the request issued by GitHub Actions originates in a different datacenter (SFO in our tests), this will not work as expected.
routes We define several routing rules to map the common static assets of a Create-React-App to the relevant files on disk. Most importantly we map all other (unmatched) requests to index.html since we have a Single Page Application (SPA).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment