Skip to content
This repository has been archived by the owner on Dec 2, 2017. It is now read-only.

Deploy to ZEIT Now

Sergio Xalambrí edited this page Jul 25, 2017 · 1 revision

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.

Configuration file

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.

Deploy

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.

Clone this wiki locally