Host a static site with Express
Check your server's IP and port number#
Visit the client portal. On the My Services
page, click your server name to view its IP and port. We'll use them later.
Create a JS file#
Next, in the control panel, click the Files
tab and New File
.
Copy and paste the codes below. Replace the port number with your server's port.
Note
If you are a beginner to Express, learn more about it at their official docs.
After that, click Create File
and set the filename to index.js
.
Install Express#
Start the server and enable the Shell Access Mode.
Run this command to install Express:
Download a Bootstrap 5 website template#
In the Shell Access Mode, run the following commands:
Now, you can exit shell access. Your web app will start automatically.
Visit the website#
Once your express app is online, you can visit your website with the IP and port number you saw in the client portal (e.g. 216.27.10.96:27188
) in your browser. Do not use our node hostname (e.g. free4.alaister.net:27188
), otherwise you will see an SSL error.
Done! You have now created a static site.
Configure custom domain and HTTPS (recommended)#
Please read our custom domain guide.