Skip to content

Prototype for Server-Sent Events (SSE) using Django and React. This project demonstrates real-time data updates with Django as the backend and React as the frontend.

License

Notifications You must be signed in to change notification settings

tyronejosee/prototype_sever_sent_events

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prototype Server-Sent Events

Server-Sent Events (SSE) is a unidirectional communication technique where the server pushes updates to the client over a single persistent connection. The client establishes the connection using HTTP, and the server sends updates whenever new data is available in a standardized format. SSE is efficient for real-time updates because it eliminates the need for continuous client polling and supports automatic reconnection.

Long Polling

💻 General

🗃️ Repository

Clone the repository.

git clone [email protected]:tyronejosee/prototype_sever_sent_events.git

🛠️ Backend

⚙️ Installation

Activate the virtual environment:

pipenv shell

Install dependencies:

pipenv install
pipenv install --dev

Verify dependencies:

pipenv graph

Run the development server using uvicorn:

uvicorn core.asgi:application --host 127.0.0.1 --port 8000

Or using daphne:

daphne -b 127.0.0.1 -p 8000 core.asgi:application

Run the migrations:

python manage.py migrate

Create a superuser to access the entire site without restrictions:

python manage.py createsuperuser

Log in to admin:

http://127.0.0.1:8000/admin/

🎨 Frontend

The front end of the application was created with Next.js using the App Router introduced in Next.js 13 and the package manager PNPM.

✅ Requirements

⚙️ Installation (Front-end)

To get started, make sure you have PNPM installed on your system. Then, follow these steps:

Navigate to the frontend folder:

cd ./frontend/

Install the dependencies:

pnpm install

Available Scripts

Start the development server at http://localhost:5173/:

pnpm dev

Enjoy! 🎉

About

Prototype for Server-Sent Events (SSE) using Django and React. This project demonstrates real-time data updates with Django as the backend and React as the frontend.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published