Setup a new python virtual environment
cd api
pip3 -m venv .venv
And activate the virutal environment
For MacOs
source .venv/bin/activate.fish
For Windows
env/Scripts/Activate.ps1
Then, install the dependencies using
pip3 install -r requirement.txt
NOTE: VSCode can identify requirement.txt as pip file and prompt to create a virtual enviroment
To load item's data into the database, run
python3 script.py --item
To generate a bcrpyt salt, run
python3 script.py --salt
For token generation, we need a SECRET and ALGORITHM. add the following inside
schema/.env
file
SECRET=<your-secret>
ALGORITHM=HS256
# Inside your api directory run the following command
uvicorn main:app
# for development, use --reload
uvicorn main:app --reload
This runs the server at localhost:8000 and API documentation can be found at localhost:8000/docs
- Nodejs
- NPM
Run the following command to install the node packages,
cd frontent
npm install
# for development
npm run dev
# for production
npm run build
npm run preview
This runs the frontend server at localhost:8080