- Ashik Nesin
Sometimes, all you want is a simple website.
No Git, No time-consuming build steps, No CI/CD pipeline, Nothing.
Just a simple file hosting.
Like in the Good Old Days of FTP.
You just upload the files and it just renders them.
That's where Surge.sh comes in.
I like the simplistic approach of Surge. You have only CLI to interact with it. They don't even have a fancy dashboard.
You can even use it for hosting apps building using frontend frameworks like React/Vue/Svelte.
Let's get started
The only dependency that you've is installing their CLI. Make sure you've Node.js installed in your machine.
Then, you can install Surge by running the following command:
npm install --global surge
And once it's installed login/create your account by entering the username and password.
Publishing your app/website
Publishing/republishing is also straightforward.
Just go to the directory which you want to publish/host (usually, dist)
And then run
It'll host your site and configure it to a randomly generated subdomain.
You can configure the subdomain as well by passing
surge --domain something-unique.surge.sh
Surge.sh has lot of others features like custom domain, redirecting, ignoring files, etc as well which you can read it in their docs. And almost all the features are free.
Happy simple hosting!