This is a sample project that uses React for the frontend and Django for the backend.
- Git should be installed on your machine.
- Node.js should be installed. You can download it from https://nodejs.org/.
- Python 3.6 or higher should be installed on your machine.
- PostgreSQL should be installed on your machine.
- Clone this repository:
git clone https://github.com/username/projectname.git
. cd
into theprojectname
directory.- Run
npm install
to install the required dependencies for the React app. cd
into thebackend
directory.- Create a Python virtual environment by running
python -m venv venv
. - Activate the virtual environment by running
source venv/bin/activate
. - Run
pip install -r requirements.txt
to install the required dependencies for the Django app. - Create a PostgreSQL database named
projectname
. - Create a
.env
file in thebackend
directory with the following contents:
Replace username
and password
with your PostgreSQL username and password.
cd
into theprojectname
directory.cd
into thebackend
directory.- Activate the virtual environment by running
source venv/bin/activate
. - Run
python manage.py migrate
to create the database tables. - Run
python manage.py runserver
to start the Django development server. - Open a new terminal window and
cd
into theprojectname
directory.
cd
into thefrontend
directory.- Run
npm start
to start the React development server. - Open your browser and go to http://localhost:3000/.