The real “magic” behind laravel valet is the ability to use a fake top level domain (.localhost or whatever) and reference your local stuff as
foo.localhost without having to go manually put entries into your hosts file and so forth…
you can accomplish the same by manually installing dnsmasq.
That of course is just one piece of the puzzle, because all it’ll accomplish is allowing
[whatever-you-want].localhost domains to point to your local IP… then you’d also need the other parts, caddy to serve vhosts on that top level domain, in the case of node apps reverse proxying specific ports, in the case of php, pointing at the main entry point of the php application with php-fpm or whatnot…
If you absolutely must access your app without specifying a port, and with a custom domain, you could bind to port 80, and execute the adonis app with superuser privileges so that you can bind to port 80, and then add an entry in your hosts file (
/etc/hosts on mac & linux,
c:\Windows\System32\Drivers\etc\hosts on Windows) mapping your desired faux domain to your local machine, or anything in the 127.x.x.1 subnet, really…
Then assuming you have something handling port 80 on your local machine, and that something is what you want it to be, you can just hit http://myfakedomain.local in your browser, no port number, nothing else required.
Valet is nifty, and really handy especially if developing many applications simultaneously, but at the end of the day, it’s just managing some config so you don’t have to do so manually, if it’s really useful, it wouldn’t be difficult to replicate without valet. In my experience though, it’s almost always easier to just specify the port number directly in the browser and point at