Skip to content

Instantly share code, notes, and snippets.

@rekomat
Last active May 18, 2020 15:02
Show Gist options
  • Save rekomat/2a7b0d0c379efaf51372b5f4b59402ab to your computer and use it in GitHub Desktop.
Save rekomat/2a7b0d0c379efaf51372b5f4b59402ab to your computer and use it in GitHub Desktop.

Vercel Cheatsheet

Cheatsheet for Vercel deployment and hosting

Deploy a new instance

Upload, build and run

my-app$ vercel

If you're on the fee plan, the cli will ask you to confirm, that the deployment will be public (Source is publicly available at https://.now.sh/.src).

Use the --public option to omit the warning
my-app$ vercel --public

List instances of an app

$ vercel ls <my-app>

Use alias

$ vercel alias <deployment-id | deployment-url> my-alias

Delete instance

Delete all instances of an app
$ vercel rm <my-app>

Delete all non-aliased instances of an app
$ vercel rm <my-app> --safe

Environment variables

Vercel Blog: Environment Variables UI
Example "with-dotenv"

Pull development env variables
$ vercel env pull

DNS

Docs: DNS Record Management Through the CLI

Use external mail server

Create an MX record which makes the mail server located at mail.awesome-now.us responsible for handling emails sent to an address suffixed with @zeit.rocks.

$ vercel dns add zeit.rocks @ MX mail.awesome-now.us 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment