MIB frontend backend management server setup - CloudCommandos/JohnChan GitHub Wiki
apt update
apt install -y python
apt install -y python-pip
apt install -y python-psycopg2
apt install -y libpq-dev
apt install -y nodejs
apt install -y npm
npm install -g serve
npm install -g webpack webpack-dev-server
Assuming that the backend_server
project folder is located at /var/www
,
install backend server dependencies
cd /var/www/backend_server
pip install -r requirements.txt
Install Postgresql
apt install postgresql
Change to Postgresql user
sudo su - postgres
Access Postgresql from user postgres
psql
Set password for postgres
user inside Postgresql
ALTER USER postgres PASSWORD 'myPassword';
Create MIB database
CREATE DATABASE mib;
Start the backend server in the background of a tmux session
cd /var/www/backend_server
tmux
python IssMain.py &
Assuming that the frontend
project folder is located at /var/www/
,
Install dependencies of the frontend server. Commands are listed in /var/www/frontend/to do.txt
.
Then build the frontend server
cd /var/www/frontend/
npm run build
Then start the frontend server in the background
cd /var/www/frontend/
serve -s build &