25th May 2020
Steps to follow:
npm install surge
cdto your directory with static content: Type
It cannot be easier. If you do not want to enter the domain name over and over again, you can store this chosen domain name in file
CNAME and you won't be asked the next time:
echo Your_Domain > CNAME
The surge command offers the following options.
$ surge --help surge – single command web publishing. (v0.21.3) Usage: surge <project> <domain> Options: -a, --add adds user to list of collaborators (email address) -r, --remove removes user from list of collaborators (email address) -V, --version show the version number -h, --help show this help message Additional commands: surge whoami show who you are logged in as surge logout expire local token surge login only performs authentication step surge list list all domains you have access to surge teardown tear down a published project surge plan set account plan Guides: Getting started surge.sh/help/getting-started-with-surge Custom domains surge.sh/help/adding-a-custom-domain Additional help surge.sh/help When in doubt, run surge from within your project directory.
Your e-mail and encrypted password are stored in
surge will not honor symbolic links in your deployment directory. For example, an image directory will not get copied over to surge.sh.