Skip to content

A sample project depicting communication between frontend and backend using RestAPI communication. Backend - Django , Frontend - Reactjs

Notifications You must be signed in to change notification settings

Gokuls7/RestAPI_demo

Repository files navigation

Description

This project is intended to demonstrate a RESTAPI communication between frontend(Reactjs) and Backend(Django). The database(db.sqlite3) already contains two books list. The project returns the list of books.

Getting Started

Start the python server.

# create a virtual environment
$ python -m venv .venv
$ source .venv/Scripts/activate
$ pip install -r requirements.txt

# Proceed with the below step if you want to create a separate migration by deleting the db.sqlite3 file or else skip this step.
# Make migrations
$ python manage.py makemigrations
$ python manage.py migrate

# Run the python server on port 8000
$ python manage.py runserver 8000

Start the ReactJs Web APP.

$ cd simple-reactjs-app
$ npm i
$ npm start
# starts to run on port 3000

Click on the Fetch Books button to view the list of books available in the database.

image

About

A sample project depicting communication between frontend and backend using RestAPI communication. Backend - Django , Frontend - Reactjs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published