Skip to content

danieltrolezi/swoole-app

Repository files navigation

🚀 Base Swoole Application

Welcome to the base Swoole application repository.

This repository contains a basic application built using the Swoole extension in PHP 8.3. It includes an HttpServer and a WebSocketServer.

The application demonstrates how to implement a simple router, manage routes, and handle WebSocket connections and Coroutines efficiently.

Getting Started

Follow the steps below to set up and run the application.

Requirements

Running the Environment

  1. Build Images:
docker compose build
  1. Run the Containers:
docker compose up -d
  1. Access the Examples:
http://localhost/examples

Explore the examples to see how to leverage Swoole for high-performance network programming.

Servers

Application Type Address
Interface Nginx/JS http://localhost:80
API Swoole http://localhost:8080
WebSocket Swoole http://localhost:9090

Application Reference

Description Location
Docker's Entrypoint /docker/entrypoint.sh
Server's Starting point /docker/supervisord/*
Application's Bootstrap /bootstrap/app.php
HTTP Server /app/Servers/HttpServer.php
Websocket Server /app/Servers/WebSocketServer.php
Router /app/Router.php
Examples /public/examples/*