DEV Community

Mbenga
Mbenga

Posted on

What's in my toolbox #1 : surge.sh

Have you ever found yourself in a situation where you had developed a static site. He is beautiful, superb, magnificent even. You want, no, you MUST show it to the world. It is imperative that you host it and publish it.
But at this point you don't have a host, and you end up having to:

  • Create an account with a web host
  • Take a subscription
  • Get FTP / sftp access
  • Launch FileZilla or other FTP transfer software
  • Upload files ... a lot of steps. Too much for a small static site in my opinion. For the creators of surge.sh too.

Surge is a tool in the form of CLI that allows static sites to be put online under domain names of the type: domain- random.surge.sh.

To use Surge, all you need to do is install a recent version of Node.js and NPM. Then everything goes very quickly:
Run npm install --global surge to install
Run :

surge
 path/to/my-project
 my-project.surge.sh
Enter fullscreen mode Exit fullscreen mode

And There you go. All is done.
In addition to simply being able to upload sites easily, surge offers other features:

  • Use your own domain names
  • Create ssl certificates for your domain names
  • Create teams
  • Automated Gzip compressions / decompressions
  • Automatically redirect "www" domain names
  • List your projects
  • Secure your projects with a password
  • Set up incremental posts

I advise you to test this tool. It is very suitable for the production of a small static site, or a prototype project to show to the client.

Even if it also works for larger sites, I would still tend to focus on other tools. But I will tell you about that later.

See you soon. Love, kiss. Bye.

PS: This post is 2 weeks late... Sorry for the delay, I will manage to set up a routine to write every week 🤞

Top comments (0)