- Python 3
- npm
- Navigate to the
backend
folder in the project root folder. - Run
python3 -m venv env
to create a new python virtual environment. - Run
source env/bin/activate
on Linux/Mac or.\env\Scripts\activate.bat
on Windows to start the new virtual environment. - Run
pip install -r requirements.txt
to install dependencies. - Create Django environment file: create a new file called
.env
under thebackend/backend
folder. The contents of this file should beSECRET_KEY = 'secretkeyhere'
. See this guide for details on generating this key. - Run
python manage.py migrate
to update the database.
- Navigate to the
frontend
folder. - Run
npm install
to install dependencies. - Optional: populate the
frontend/public/images/photos
folder with images of the planets. These photos are copyrighted so they're not checked into source control.
- Navigate to the
backend
folder in the project root folder. - Run
source env/bin/activate
on Linux/Mac or.\env\Scripts\activate.bat
on Windows to start the virtual environment. - Run
python manage.py runserver
to start the server. - When done, run
deactivate
to stop using the virtual environment.
- Navigate to the
frontend
folder. - Run
npm run start
to start the app in development mode. - Open http://localhost:3000 to view it in the browser.
Alternatively, you can build the app in production mode:
- Run
npm run build
to build the app into thebuild
folder. - To serve the app, you can use any server software. For example with the npm serve package package (
npm install -g serve
), you can runserve -s build
.