Skip to content

Alexisvt/NOW-TUTORIAL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Now Lesson Resume

How to install Now

npm i -g now

How to deploy a docker container or a node app

c:\MyAppOrDockerContainerFolder> now

How to force to deploy something staticly

c:\MyApp> now --static

How to alias a deploy url

now alias my-last-deploy-url.now.sh new-alias

Where new-alias is the new alias for the desire deploy url

Special package.json keys

  • now-start: replace start package command
  • now-build: replace build package command

How to make a deployment public

now -p 

How to change our code live in now

  • First we need to go the url that we deploy
  • Then We need to append to the url _src and hit enter

Sample:

http://my-last-deploy-url.now.sh/_src

Everytime that we highlight something It will generate a url that we can share with others to point the error

How to configure an environment variable with Now

c:\MyApp> now -e KEY=VALUE

and if we want to set multiple variables:

c:\MyApp> now -e KEY1=VALUE1 -e KEY2=VALUE2

How to define a secret with Now

First we need to set our secrets

c:\MyApp> now secret add variableName VALUE

Now to call that variableName's value:

c:\MyApp> now -e KEY=@variableName

To show the documentation about the secrets

c:\MyApp> now secrets

How to show all the secrets in our account

c:\MyApp> now secrets ls

How to remove an specific secret

c:\MyApp> now secret remove secretName

How to see the list of sites or deployments

This command show the list of deployments and the associated sites

now ls

How to remove a site with now cli

You need to get the id of your deployment that you want to delete or remove

now rm id-of-the-site

or

now remove id-of-the-site

More documentation: how to remove deployments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published