HTTP App Example
HTTP App Example
This page introduces an HTTP backend example built with the Sanic framework and shows how to build and deploy a high-performance HTTP service quickly.
Quick Start
Project Overview
This example is built on the Sanic async web framework and provides:
- High performance: asyncio-based asynchronous processing
- Lightweight: a small API surface and fast responses
- Extensible: modular development with middleware and blueprints
Get the Project
Repository: app-http-example
# Clone the project
git clone https://github.com/GMSSH/app-http-example.git
# Enter the project directory
cd app-http-exampleRequirements
- Python: >= 3.8 (3.10+ recommended)
- Package manager: pip (dependencies must be installed with pip)
- Framework: Sanic async web framework
Installation and Configuration
Important: dependencies for this project can only be installed with pip.
# Enter the project directory
cd app-http-example
# Install dependencies with pip
pip install -r requirements.txt
# Start the Sanic service
python main.pyResult
After a successful start you will see the Sanic startup output:

Important Notes
Warning
Important: when releasing the app you must use a random port and write that port to the app.port file.
app.port file: stored at /.__gmssh/plugin/{organization}/{app}/tmp/app.port
