-
Notifications
You must be signed in to change notification settings - Fork 10
Deploy to ZEIT Now
After creating the Grial API you'll want to deploy it to production and let the world use it. One way to do that is using the ZEIT Now.sh to easily deploy it.
The first thing you need to do is create a now.json
file. There you are going to put the deployment configuration.
{
"name": "your-app-name",
"alias": "your-alias.now.sh",
"dotenv": true
}
The dotenv
key allow use to reuse our .env
file, we can also add a env
key to now.json
and remove the dotenve
key, that way for production it will use the environment variables put in env
.
Now we need to deploy, to do that just install the ZEIT Now CLI and then run this simple command:
now
After a few minutes we'll have our API running in a unique URL, we can now alias it to a simpler and production ready URL.
now alias
Or if we want to do it in a single command
now alias (now) your-alias.now.sh
And that's all, now we have our Grial API running in ZEIT Now as a production application.