expose: expose command not found?

composer --version
Composer version 1.10.9 2020-07-16 12:57:00

installation:

composer global require beyondcode/expose

Second time outpout:

composer global require beyondcode/expose
Changed current directory to /root/.composer
Using version ^1.0 for beyondcode/expose
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
1 package you are using is looking for funding.
Use the `composer fund` command to find out more!

trying expose command:

expose serve my-domain.com
-bash: expose: command not found

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

You can update your $PATH variable like this:

PATH=~/.composer/vendor/bin:$PATH
echo PATH=$PATH >> ~/.bashrc

You need to move your expose composer file to somewhere in your PATH. For me I moved my expose file from /home/marvelousmari/.config/composer/vendor/beyondcode/expose/builds/expose to /usr/bin/ if you can’t find ./.config/ then you can use ctrl+h while in your file explorer or use ls -a in terminal

the alternative to this is to add where it already is to your system’s PATH variable. To do that just do $ PATH=${PATH}:XXXXXXXX where XXXXXXXX is the location of the folder containing the expose build (do not have other items in this folder or path unless you want to use those files as commands everywhere).

You can update your $PATH variable like this:

PATH=~/.composer/vendor/bin:$PATH
echo PATH=$PATH >> ~/.bashrc

Do you mind showing a some more details? Newbie here…thank you

Edit: I got it to be working with PATH=${PATH}:/home/myserver-1/.config/composer/vendor/bin

Somehow the URL given does not work even I use expose on the directory of my webpage…

Thank you for sharing this. myserver-1 should be replaced with user. which is the device user

I ended up using Cloudflare tunnel. It’s free now.

On Tue, Dec 13, 2022, 12:10 PM opeen @.***> wrote:

same problem expose: command not found

— Reply to this email directly, view it on GitHub https://github.com/beyondcode/expose/issues/104#issuecomment-1349623368, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF7OL3DI5OB52VCNHCZSS73WNDJZZANCNFSM4PJIPRMA . You are receiving this because you commented.Message ID: @.***>

2022 this has changed to /home/user/.config/composer/vendor/bin/expose