Deploy the application in CodeSpaces.
Part 1:
- Login to GitHub Account
- Fork the repository (You can clone and upload too)
- In the repository, create a new Codespaces Environment
- Run the application
Part 2:
- Use npm run build to make the dist folder.
npm run build
- Checke the python code, with minor modification of the commented codes, and commening one line, you can run the dist version of react.
- Download the whole repo, and upload it in myCourses.
- backend (app.py)
- database (mydatabase.db)
- frontend (_frontend/users)
The back end of the application is based on Flask library. The steps to run the application are as follows:
- Initiate the virtual environment
python3 -m venv env
- Activate the env
in Windows run
env\source\activate.bat
in Mac OS:source env/bin/activate
- install the needed libraries
pip install flask flask_cors
- run the application
python app.py
(note that python should be installed on your machine, or you can run it on a virtual environment/GitHub Codespaces)
The database is based on SQLite. If the database does not exist, it will be created automatically.
You just need to visit this endpoint to create the database:
http127.0.0.1:5002/createDB
The frontend is based on React library. The steps to run the application are as follows:
cd _frontend/users/
- npm i
- npm run dev