The goal of this project is to provide an easy access point for all new/return students where they can find useful information. The project is in the form of a web app.
https://github.com/UTACE/ACEKnow
Frontend
- React.js + bootstrap style
Backend
- Django(RESTful style APIs)
Frontend
- Node version >= 12.18.1
- Npm version >= 6.14.10 (npm is defaultly installed when you install the latest version of Node, so you don’t have to install npm manually)
- All libraries listed in package.json (run “npm i” under “./frontend”)
Backend
- Python version >= 3.6
- All Python libraries listed in requirements.txt
Note: .
means the path to the folder aceknow
-
Package the whole frontend [It may takes some time]
Run the following command under “./frontend”.
npm run build
-
Let Django collect all static files
Run the following command under “./”
python manage.py collectstatic
Note that if you encounter syntax error, try the following command instead:
python3 manage.py collectstatic
-
Modify Django setting to DEBUG=False
Edit “setting.py” and modify “DEBUG=True” to “DEBUG=False”
-
Run the project
Run
python manage.py runserver
Run frontend and backend in two instances
-
Run the project in one command line
Run
python manage.py runserver
-
Run the frontend in another command line
Run
npm run start
under “./frontend”.
Note: If you don’t need any frontend backend communication, you can test your change by only running the frontend.
Note: pycache files should not be included, if the gitignore file is not working, run the following command in terminal:
git rm -r --cached . && git add . && git commit -m "fixing .gitignore"
This will remove the pycache stuff, add ., and commit. After running this command you are ready to push whatever branch to GitHub.