It works by installing the expose
composer binary via the composer CLI:
composer global require beyondcode/expose
cd path/to/project
expose .
If you want to use the sharedwithexpose.com
domain, you’ll need to sign up for a Beyond Code account (free). Otherwise, you can run your own expose server. Here’s what the CLI looks like once you run expose:
Like Ngrok, Expose has a command-line tool (the client) and a server, which work hand-in-hand to tunnel local websites publicly. It also includes an excellent web-based dashboard on localhost:4040
to inspect requests and responses, replay requests, and copy the equivalent curl
command:
Screenshot credit: Beyond Code GmbH
Under the hood, Expose uses the ReactPHP framework. If you are not familiar with ReactPHP, I recommend checking out Marcel’s Learning ReactPHP Video Course to learn how you can use this robust framework with PHP.
#news #php