Server - Contents

MojoJS App-Deployment

new: 01-Dec-2025

Establishing the MojoJS App as a Systemd Service

One well-tested step to prepare the app to be rendered by a webserver (eg. Nginx) is to create a systemd service as described at Mojo.js-Cookbook:Systemd). Here is what we have used: mjpg-service.txt

sammy@imega:~/pg$ sudo nano /etc/systemd/system/mjpg.service
sammy@imega:~/pg$ sudo systemctl start mjpg.service
sammy@imega:~/pg$ sudo systemctl status mjpg.service // check if running

Establishing the MojoJS App on the Internet

Apart from having the MojoJS app correctly configured and running in the background as a systemd service daemon, it is necessary to have one's own domain (such as myexample.com) with a SSL Certificates (Let'sEncrypt).

Nginx to render MojoJS

In Webmin->Servers->Nginx Webserver, create a Virtual Host. (Note: if the Nginx module does not appears, see for its installation the blue note in: Basic Site Setup-PtB).
For the Server Name: myexample_com.conf (the .conf subtext is necessary)

Copy & paste this text in the Nginx virtual host (modify the domain and the SSL Certificates): Svelte-nginx.txt

Note: Just a reminder that if this example MojoJS app has been successful to this point under one's proper domain, the postgres database settings and particularly the password will require appropriate changes if such an app is to be taken into full production.

MojoJS MojoJS-Blog
MojoJS-Deploy MojoJS-Extras