Cheat Sheets


Created: 2017 May 30th

Updated: 2020 April 18th

The awesome now from zeit! It has a great cli with probably all of this detailed in there under -h somewhere 😁

Add a TXT record

Need to add a verification for something like the Google Search console.

GNU Bash icon
now dns add '@' TXT someTextRecordYouNeedToAdd


GNU Bash icon
now dns add subdomainreference CNAME


Got your own domain name? You can alias your latest now deployment

GNU Bash icon
now alias

Scale your deployment

Want your site to not get frozen? And have visitors have to wait for the instance to spin up?

This is straight from the CLI with now scale -h

GNU Bash icon
# Create an deployment with 3 instances, never sleeps:
now scale 3
# Create an automatically scaling deployment:
now scale 1 5
# Create an automatically scaling deployment without specifying max:
now scale 1 auto
# Create an automatically scaling deployment without specifying min or max:
now scale auto
# Create an deployment that is always active and never "sleeps":
now scale 1

Environment variables

Config stuff I always forget!

If it’s keys, then use secrets and configure them in the package.json:

"now": {
"alias": "cool",
"env": {
"AWS_ACCESS_KEY_ID": "@aws_access_key_id",
"AWS_SECRET_ACCESS_KEY": "@aws_secret_access_key",
"MONGODB_URI": "@mongodb_uri",
"S3_BUCKET_NAME": "@s3_bucket_name",
"SECRET": "@secret"

If you have a lot of configuration variables and you dont want to make a mess in the package.json:

GNU Bash icon
now -E

That will pull your .env file and use that in place of adding individual vars via now -e var. I have always used dotenv and I understand that now uses dotenv for this and using without is untested by me?