GithubHelp home page GithubHelp logo

limweb / swoole-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from james2doyle/swoole-examples

0.0 1.0 0.0 24 KB

Examples on how to use the Swoole async PHP framework

License: MIT License

Dockerfile 2.35% PHP 75.46% HTML 22.19%

swoole-examples's Introduction

Swoole Example Projects

Examples on how to use the swoole async PHP framework

Examples Inside

  • serve-file: server a file using the correct mimetype
  • client: make an async call to an external domain and download the page
  • channel: share memory and data between coroutines
  • process: load an external program and run it multiple processes
  • router: use an off-the-rack router (nikic/fast-route) to route request methods and URIs
  • websocket: a chat example with websockets
  • slim: an example of how to use the Slim Framework
  • event-source: (incomplete) an example of the EventSource long-lived connection

Installation

Take a look inside docker-compose.yml and uncomment the example you want to run.

  • composer install
  • docker-compose up

Development

When modifying files, you need to restart the docker instance to see the changes. This is because the files are loaded into Swooles memory and therefore cannot be modified after the server is started. You may be familiar with this workflow if you developed anything using Node.js.

swoole-examples's People

Contributors

james2doyle avatar limweb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.