LoginSignup
14
4

More than 5 years have passed since last update.

NODE_ENV でよく使われる値

Last updated at Posted at 2018-03-01

発端

productiondevelopment はよく使うけれど、 CI でテストするときやステージング環境ではどうするのだろう?と思って調べた。

結論

以下の2つは、ほぼデファクトスタンダードっぽい。

  • production
  • development

以下のものは、例として登場することが多そう。

  • staging
  • testing test
  • local

testing にすべき」みたいな記事をどこかで見た気がするのだけれど、現代(2019年3月)では Jest がデフォルトで test を使っているため、 test を使うべきです。

見たもの

やりたかったこと

GitHub で検索して、統計的なものを取りたかった。

  • .json とか .yaml とか .yml の場合は、 NODE_ENV が含まれる行をとってくる
  • .ts とか .js とかは、 NODE_ENV から5行分取ってきて、上記で取れた値のそれぞれがどのくらい使われているかを見る

モチベと時間があるときにやりたい

14
4
1

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
14
4