Host your Qt WASM App in Serge.sh

Host your Qt WASM App in Serge.sh

As explained previously in # Day1: Qt is the chosen one! , Qt Support many platforms, and now one of them is the web using Webassmebly as you can build your C++ / qml app without any changes to run as a web app.

This is post is not about building the Qt WASM app but rather to find a hosting service that can help you host your app easily.

My current choice is surge.sh

  • Free Plan
  • Command-Line support tool to register/add/remove and update projects
  • subdomain support
  • WASM Binary Server-side compression
  • CDN support

Install

npm install --global surge

Use sudo if you want to install as root/admin

Deploy

  • Make anew folder for your project
  • Get your final build files: app.js app.wasm app.html qtloader.js qtlogo.svg inside the new project folder
  • rename the app.html to index.html
  • run surge inside the terminal in your new project folder
  • it will ask you to register new account with email and pass
  • then will ask you for project folder and project URL
  • you can change the project subdomain as you wish if it was not selected before
  • upload your project

ksnip_20200725-234615.png

Examples:

BMI Calculator

ksnip_20200725-225623.png bmic.surge.sh

MarkDown Editor

ksnip_20200725-225845.png mde.surge.sh


bymecoffe.png Thank you for your support!