Can the port number on which vue-cli is running be removed?

can the port number on which vue-cli is running be removed

May.08,2022

do you mean directly typing http://localhost? This kind also has a port, the default port 80, change the port on the line.
moreover, without the port, you can't run the program!


change port 80 access without port


// vue.config.js
module.exports = {
 devServer: {
    host: "localhost",
    port: 1111, // 
}

Protocol + domain name + port number constitute a complete url
you can't do without a port, but if you don't enter a port browser, you default to port 80
of course, nginx forwarding goes to 80 first and then forwards

.
Menu