Cheat Sheets


Created: 2017 May 30th

Updated: 2020 April 18th

Edit this page on GitHub

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.

1now dns add '@' TXT someTextRecordYouNeedToAdd


1now dns add subdomainreference CNAME


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

1now 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

1# Create an deployment with 3 instances, never sleeps:
2now scale 3
3# Create an automatically scaling deployment:
4now scale 1 5
5# Create an automatically scaling deployment without specifying max:
6now scale 1 auto
7# Create an automatically scaling deployment without specifying min or max:
8now scale auto
9# Create an deployment that is always active and never "sleeps":
10now scale 1

Environment variables

Config stuff I always forget!

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

1"now": {
2 "alias": "cool",
3 "env": {
4 "AWS_ACCESS_KEY_ID": "@aws_access_key_id",
5 "AWS_SECRET_ACCESS_KEY": "@aws_secret_access_key",
6 "MONGODB_URI": "@mongodb_uri",
7 "S3_BUCKET_NAME": "@s3_bucket_name",
8 "SECRET": "@secret"
9 }
10 },

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

1now -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?