Giter Club home page Giter Club logo

Comments (5)

Nedum84 avatar Nedum84 commented on June 7, 2024 1

from reactphp.

WyriHaximus avatar WyriHaximus commented on June 7, 2024

Not sure if cpanel supports running your own services with it. Would suggest reaching out to them and your hoster on how to do this.

from reactphp.

StevieDC avatar StevieDC commented on June 7, 2024

A2hosting said they would have to open up a port for me but I would also need a static IP address (not free). That was to use socket.io but I think it would be the same for a ReactPHP server.

from reactphp.

Nedum84 avatar Nedum84 commented on June 7, 2024

I later fixed it by purchasing a VPS and configuring the server on a port.

from reactphp.

clue avatar clue commented on June 7, 2024

@Nedum84 This is an interesting one!

The way @reactphp is most commonly used is by running it as a long running process like an application server, so this would usually require some kind of command line access to configure and launch this process.

That said, it's also completely possible to use ReactPHP in a traditional short-lived PHP application that only handles a request and then terminates. In this case, you're bound to your HTTP request lifecycle and wouldn't want to start any long running server sockets or timers that would run longer than the HTTP request round trip as everything should terminate once the HTTP response is sent.

You may also want to check out https://framework-x.clue.engineering/docs/best-practices/deployment/ which describes how this can be used in a web application that can run both from a traditional web application and in a long running application with the exact same code base.

I hope this helps πŸ‘

from reactphp.

Related Issues (20)

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.