Website: https://polymatx.dev
Requires python3
and golang
make dev
GoLang is required to compile and manage WebAssembly modules using Go. Here's how to install Go:
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-go
Once installed, verify the installation with:
go version
wasm_exec.js
is provided by the Go installation and is used to support Go's WebAssembly binaries in the web environment. It emulates a Go environment within the browser, handling tasks like memory management and system calls.
To run your server in the background continuously, especially on a VPS, you can use a variety of methods. Here are a few common approaches that are suitable for production or semi-production environments:
- Using nohup Command
nohup make dev &
- Using screen or tmux
screen -S server make dev # Press Ctrl+A then D to detach screen -r server
tmux new -s server make dev # Press Ctrl+B then D to detach tmux attach -t server
- Using Systemd (Recommended for Production)
-
Create a systemd service file:
nano /etc/systemd/system/website.service
[Unit] Description=Website Terminal [Service] ExecStart=/usr/bin/make -C /path/to/your/project/dir dev WorkingDirectory=/path/to/your/project/dir User=your-user Restart=always [Install] WantedBy=multi-user.target
-
Enable and start your service:
sudo systemctl enable website.service sudo systemctl start website.service
-
Check service status is OK or not
sudo systemctl status website.service journalctl -u myservice.service
-