First, run these commands in terminal:
git clone [repository-url]
cd [local-repository]
- install VS Code or other preffered IDE
install following frameworks and packages, and DB:
- Node.js + React.js
- Python 3.8 + Django
- Cypress
- PostgreSQL
create and start a a virtual environment:
virtualenv env --no-site-packages
source env/bin/activate
Install the project dependencies:
pip install djangorestframework
pip install markdown # Markdown support for the browsable API.
pip install django-filter # Filtering support
pip install django-cors-headers
create a postgres db with the following settings:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "text",
"USER": "postgres",
"PASSWORD": "postgres",
"HOST": "127.0.0.1",
"PORT": "5432",
}
}
Run these commands in terminal:
python manage.py migrate
python manage.py createsuperuser # create admin account
python manage.py makemigrations server # makemigrations for the app
python manage.py migrate # run again
python manage.py runserver # start the development server
open
localhost:8000
on your browser to view the app
Check
package.json
file and ensure scripts are notated as below:
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"test:cov": "npm test -- --coverage --watchAll=false",
"test:debug": "react-scripts --inspect-brk test --runInBand",
"eject": "react-scripts eject"
},
Delete the
node_modules
folder and any 'lock' files, such asyarn.lock
orpackage-lock.json
if present.
Run these commands in terminal:
npm install
Optional: In case of issues shown after
npm install
, run the below to automatically fix the issues:
npm audit fix
Alternatively, use the below to see the errors:
npm audit
npm start
open
localhost:3000
on your browser to view the app