📅  最后修改于: 2023-12-03 15:29:18.282000             🧑  作者: Mango
AdonisJS is an open-source, MVC framework for Node.js. It provides a stable foundation for building robust, loosely-coupled, and scalable web applications. Adonis Serve IP External is a command used to serve your AdonisJS application on your external IP, making it accessible from other devices.
To serve your AdonisJS application on your external IP, execute the following command:
adonis serve --dev --ips <external-ip>
Replace <external-ip>
with your external IP address. This command will start the AdonisJS server and make it accessible from other devices on your network.
The following options can be passed to the adonis serve
command:
--dev
: This option starts the server in development mode, which provides additional logging and error reporting capabilities.
--ips
: This option specifies the IP addresses that the server should listen on. By default, the server listens on localhost
(127.0.0.1). If you want to make your server accessible from other devices, use this option to specify the IP addresses of those devices.
--port
: This option specifies the port number that the server should listen on. By default, the server listens on port 3333
. You can use any available port number.
Adonis Serve IP External is a powerful command that makes it easy to serve your AdonisJS application on your external IP. With this command, you can develop your application locally and test it on other devices without the need for a separate testing environment.