Skip to content

Very simple demo to help you get started with flask sockets

Notifications You must be signed in to change notification settings

nabinkhadka/simple-flask-socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Sockets

Getting started with flask sockets can be very hectic especially with very clumsy demos available in the internet. I struggled very much to find a very basic working version of it. I have posted here a simple example to let you understand the very basics of socket in flask application. I have added necessary comments to make things clearer here.

  • Uses flask_socketio for serverside and socket.io.min.js for client side

How to run

I love to create virtual environment for each and every projects and supply requirements.txt file for them to keep my system fresh and clean.

# Create a virtual environment for this app
$ virtualenv projectenv
# Activate the app's virtual environment
$ source projectenv/bin/activate
$ cd simple-flask-socket
# Then install all dependencies using 
# requirements.txt file included with the project
$ pip install -r requirements.txt
# Run the server
$ python app.py

Now you can visit the url http://127.0.0.1:5050/ Please try this out and let me know.

Thank You!!

About

Very simple demo to help you get started with flask sockets

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published