Static websites are used to deliver all HTML, JavaScript, images, video and other media files to website visitors and contains no application code within it. Sites which require few authors and contain seldom content changes are the best use cases for static website. Marketing websites or personal blogs are the most used static websites. They are economical, highly reliable websites with little to no manual intervention or administration as well as scalable to handle enterprise level web traffic.
So, do you already have some html and css written for your website and realised hosting is an additional effort? No worries, you can host your static files in less than 2 minutes or precisely in 6 keystrokes.
The must haves of this process include:
- Latest version of NodeJs.
- Install surge using npm command as below:
npm install --global surge
Now, run surge from within any directory, to publish that directory onto the web.
Steps:
- cd mysite/ navigate to the folder you want to publish
- Enter surge and hit enter.
- Enter email.
- Enter password. ( email and password is one time thing if surge has your email and password eventually you do only 4 steps other than these two)
- Hit enter when it prompts for your project path.
- Change subdomain to whatever you like or hit Enter