sudo -i
( to Root)
Assuming the home directory of root is /root
copy the files docker-compose-spidertask2.yaml, nginx.conf, package.json, main.rs, diesel.sh and .env to the /root directory
mkdir scripts
cd scripts
copy the file postgrescreatedb.sql to the /root/scripts directory
docker compose -f docker-compose-spidertask2.yaml up -d
this should run all the servers from /root directory
refer README.txt for the detailed instructions
1. Fork the given repo and set the your repo to private.
2. Setup the servers using the instructions given below
3. Dockerize the given application using Docker and Docker-compose
Language: Rust
Framework: Actix-Web
ORM: Diesel
Database: PosgreSQL
Frontend: React
Compilers: Rust v1.7.0 and node v18.0.0
How to Setup Server[Linux installation]:
cd Backend
sudo apt install libpq-dev
cargo install diesel_cli --no-default-features --features postgres
- CREATE DATABASE rust_server [in psql CLI];
- Add ENV variables for DB connection
diesel setup
[Generates the tables]cargo run
[server runs]
Any problems with setting up server refer to official cargo and diesel documents
How to Setup Frontend React Server:
cd Frontend
npm i
[install dependencies]npm start
[start react server]