Deploy Websites Like a pro

Ankit Hans
2 min readMar 23, 2021

Surge is static web publishing for Front-End Developers, right from the CLI, it’s free of cost and hassle-free.

To get started, you need to have node.js installed on your system. Then install surge globally by running the following command.

npm install --g surge
  1. Open the directory in the terminal in which your static website is located. Like here I am deploying a react application, so I have to build it and go into the build folder.

2. Now type surge command in the terminal. If you are using surge for the first time, it will prompt for username and password. It will automatically register you to their servers.

3. It will ask for the folder path you wanna deploy and the domain name (you can enter any name which is not taken already).

4. If you want to enable https (SSL security in the website), you just have to include https:// before the domain.

https://<domain>.surge.sh

Now Press Enter and your website will be live in some seconds.

Woohoo, 🎉 you have deployed your first website on surge.sh in seconds. Here is mine, check this out https://ankithans.surge.sh/

Connect with me -

--

--