Skip to content

Example of a simple communication between Websocket and Node.js with a Python3 process.

Notifications You must be signed in to change notification settings

nikolasrangel/websocket-nodejs-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebSocket + Node.js + Python 3

Example of a simple application using WebSocket and Node.js to create a Python 3 process to calculate the factorial of a number and send the result to client.

Ready for deployment to Heroku.

Client

Simple HTML page with the libraries:

  1. jQuery;
  2. Bootsrap;
  3. ReconnectingWebSocket: keep the connection alive if eventually is dropped.

Server

  1. Node.js;
  2. Express framework;
  3. Python 3: used to do the dirty work (Python process invoked by Node child_process module);
  4. ws: a Node.js WebSocket library.

Usage

node app.js

and navigate to:

localhost:3746

About

Example of a simple communication between Websocket and Node.js with a Python3 process.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published