2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Nuxtで yarn dev した時のデフォルトのポート番号を変更する

Posted at

yarn run dev もとい yarn devはデフォルトで3000のポートを取ろうとするけど、そちらは既にRailsの方で使っていることがあるので適当に開いてるポートでサーバーが建てられてしまい少しめんどくさい。

常に5000番で立ち上げるように設定

nuxt.config.jsでポート番号を指定してあげましょう。

nuxt.config.js
export default {
  server: {
    port: 5000
  },
  //...
}

参考

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?