This repository is for the backend of the project '걸엉가게'.
- Landing Page
- Frontend Repository
- Backend: This repository.
- Deployment Repository: Deployment on DKOS.
Note
This project uses Python 3.6 as D2Hub had a Python 3.6 image available back then.
If you don't have Python 3.6 installed, you can use pyenv to install it.
-
Clone the git repository:
git clone https://github.com/9oormthon9th/BE2.git cd BE2 -
Install Python 3.6 and select it:
pyenv install 3.6.15 pyenv shell 3.6.15
-
Create a virtual environment for the project:
As python 3.6 is selected,
python3andpip3commands will use python 3.6pip3 install virtualenv python3 -m virtualenv my_env # => created virtual environment CPython3.6.15.final.0-64 in 271ms -
Activate the virtual environment and install dependencies:
source my_env/bin/activate # In my_env environment, do following pip3 install -r requirements.txt
-
Set your OpenAI API key in the
./mnt/.secretfile.You can rename
./mnt/.secret.templateto./mnt/.secretand set your OpenAI API key in it. -
Run the server:
(my_env) $ flask run
-
Test the server at http://localhost:5000/api/ready
/api/ready: Check if the server is ready./api/test/course?theme=xxx: Get information of course six regardless of input./api/course?theme=example: Get a recommended course based on the input./api/food?food=example: Get a recommended food based on the input.