Installing the Front-end from Source
This documentation assumes you’ve installed the Backend before this,
if not you’ll need to generate an SSL Certificate and Key at:
- /var/lib/interlock/sslcerts/fullchain.pem
- /var/lib/interlock/sslcerts/privkey.pem
See: Creating an SSL Certificate
Installing the Requirements
Firstly, we’ll install the necessary dependencies.
WORK_PATH="/var/lib/interlock"
FRONTEND_PATH="/var/lib/interlock/interlock_frontend"
apt-get update -y
# Install curl and fetch required script.
apt-get install git curl -y
curl -fsSL https://deb.nodesource.com/setup_18.x -o "$WORK_PATH/nodesource_setup.sh"
# Add nodesource repo
bash "$WORK_PATH/nodesource_setup.sh"
# Install NodeJS and Yarn
apt-get update -y
apt-get install nodejs -y
# ! Install NGINX if you'll compile for production
apt-get install nginx -y
# Create the install directory parent and the sslcerts directory
mkdir -p "$WORK_PATH/sslcerts"
Once you’ve installed all the requirements, you can pull the latest version of the repo.
git clone https://github.com/dblanque/interlock_frontend $FRONTEND_PATH
Installing the required Node Modules
cd $FRONTEND_PATH
yarn install
Once these modules and dependencies are installed you’ll need to change your backend url in public/config/local.json.
Compiling or Serving the Front-end
Finally you’ll wish to either compile (for production) or activate the devserver.
You can do so with the following commands:
# Compile into a bundle
yarn build
# Activate devserver
yarn serve