This project consists of a Flask backend and a Node.js collaborative form frontend, both using Redis for data storage and communication.
- Ubuntu/Debian-based Linux system
- Python 3.x
- Node.js and npm
- sudo privileges (for Redis installation)
.
├── app.py # Flask application
├── front-app/
│ ├── server.js # Node.js server with Socket.io
│ └── ... # Frontend files
├── Makefile # Build and run automation
└── README.md # This file
Install all dependencies and start Redis:
make setupThis command will:
- Install Redis server
- Install Python dependencies (Flask, redis)
- Install Node.js dependencies (express, socket.io, redis)
- Start Redis server
Launch Redis, Flask, and Node.js servers simultaneously:
make run-all# Install Redis
make install-redis
# Start Redis server
make start-redis
# Stop Redis server
make stop-redis
# Restart Redis server
make restart-redis
# Check Redis status
make status-redis
# Test Redis connection
make test-redis# Install Python dependencies
make install-python-deps
# Run Flask application (background)
make run-flaskThe Flask app will be available at http://localhost:5000
# Install Node.js dependencies
make install-node-deps
# Run Node.js server (background)
make run-nodeThe Node.js server configuration depends on your server.js file.
Stop all running servers (Flask, Node.js, and Redis):
make stop-allIf you get a "port already in use" error, stop all services first:
make stop-allThen restart the services you need.
Check if Redis is running:
make status-redisTest the connection:
make test-redisExpected output: PONG
Make sure all dependencies are installed:
make setupCheck for error messages in the terminal output.
- Flask app: Edit
app.pyand restart withmake run-flask - Node.js server: Edit files in
front-app/and restart withmake run-node - Dependencies: Add new dependencies to the appropriate
install-*-depstarget in the Makefile
- Services run in the background (
&at the end of commands) - Redis requires sudo privileges for installation and service management
- Use
make stop-allbefore closing your terminal to ensure clean shutdown
[Add your license information here]