Speculare Dashboard if a Vue 3 app which means it's basically just a simple static website. The recommended way to host it is to use NGINX, this is the way we'll cover in this guide.
We recommend you to use NodeJS 15+.
# Install APT repository for node 15
wget -qO- https://deb.nodesource.com/setup_15.x | sudo -E bash -
# Install nodejs, npm
sudo apt install -y nodejs npm
The dashboard need an
.envfile before being build. The value in the
.envfile will be bundled with the app once the production build occur, so do not store any secret in it.
You can simply copy the
.envand edit the values.
# API connection URL and config (Speculare-server)
# Websocket connection URL and config (Speculare-pgcdc)
You can now build the production files using:
# Install the node dependencies
# Build the production files
npm run build
This will produce a
distfolder which holds all files needed for the production website. This folder can be placed anywhere.
For the sake of this demo we'll assume it's located in