Skip to content

Simple Universal Flask-based Web Server. Can be run on Windows, Linux, MAC, Android, etc...

License

Notifications You must be signed in to change notification settings

IvanDeus/Flask-Web-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌐 Flask Web Server

A simple, cross-platform, universal web server built using Flask library.
It serves static files from the /static directory and can be run on Windows, Linux, macOS, Android (with Python support), and more!


📦 Requirements

  • Python 3.x
  • Flask

⚙️ Setup Instructions

  1. Setup Virtual Environment (optional):

    python3 -m venv my-v-env
    source my-v-env/bin/activate
  2. Install:

    pip install flask
    git clone https://github.com/IvanDeus/Flask-Web-Server.git
    cd Flask-Web-Server
    mkdir static
  3. Configure Settings:

    • Edit flask_web_server_cfg.py to set:
      • Web server IP address (HOST)
      • Web server port (WPORT)
      • Debug mode (DEBUG)
      • Log file path (LOGFILE) (optional)
  4. Place Files:

    • Put any static files (HTML, CSS, JS, images, etc.) in the static/ directory.
    • These will be served at http://localhost:<port>/filename.ext

▶️ How to Run

In your terminal or command prompt:

python flask_web_server.py

By default, the server will start on port 1555. You can access it via:

http://localhost:1555/

For production use PM2 service (with Virtual Environment):

pm2 start flask_web_server.py --interpreter /home/user/my-v-env/bin/python3

📁 Example File Structure

project_folder/
│
├── flask_web_server.py
├── flask_web_server_cfg.py
├── static/
│   ├── index.html
│   └── style.css
└── flask_web_server.log  (generated automatically)

📝 Logging

The server logs events such as startup and route access into the file defined by LOGFILE in your config.
When DEBUG=True, logs are also printed to the console. To check logs:

tail -f flask_web_server.log

✅ Tested On

  • Windows
  • Linux
  • Android (via Termux)

2025 [ ivan deus ]

About

Simple Universal Flask-based Web Server. Can be run on Windows, Linux, MAC, Android, etc...

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages