Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask-socketio-demo

A simple demo to demonstrate using events to perform client-server communication and display data on a web page. Bitcoin prices are fetched using Coinbase API and displayed in real time.

image

Installation:

Create environment:

cd project_name

python3 -m venv venv

source venv/bin/activate

pip install -r requirements.txt

Pre-requisite:

pip install python-socketio

Run:

python3 app.py

Go to 127.0.0.1:5000 in your browser to access the flask app.

You could also run the index.html directly in the browser to see the same result.

This approach could be considered as external system connect to our socketio. (Such as ReactJS, NextJS ...)

By default, it will be blocked because we don't config the CORS, but in app.py, we are already config it, so it can be access from the external system.

Read the dev blog and explanation here

About

A demo of using events to perform client-server communication to display real time data on a web page. Bitcoin prices are fetched using Coinbase API and displayed in real time.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages