Skip to content

Commit

Permalink
chore: allow dynamic set port
Browse files Browse the repository at this point in the history
  • Loading branch information
PanJiaChen committed Jul 4, 2019
1 parent 1909018 commit c8039a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ function resolve(dir) {
}

const name = defaultSettings.title || 'vue Element Admin' // page title

// If your port is set to 80,
// use administrator privileges to execute the command line.
// For example, Mac: sudo npm run
const port = 9527 // dev port
// You can change the port by the following method:
// port = 9527 npm run dev OR npm run dev --port = 9527
const port = process.env.port || process.env.npm_config_port || 9527 // dev port

// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
Expand Down

0 comments on commit c8039a5

Please sign in to comment.