削除された内容 追加された内容
m →‎リリース: 表示崩れを修正
Lemonshiba (会話 | 投稿記録)
→‎概要: +仮リンク EventMachine
 
(18人の利用者による、間の28版が非表示)
6行目:
| 開発者 = [[ライアン・ダール]]
| 開発元 = [https://github.com/ry/node/blob/master/AUTHORS Node.js Developers]
| 対応OS = [[macOS]], [[Linux]], [[Solaris]], [[FreeBSD]], [[OpenBSD]], [[Microsoft Windows|Windows]], [[webOS]]
| 対応プラットフォーム = [[x86]], [[x64]], [[ARMアーキテクチャ|ARM]], [[Power Architecture|Power]], [[z/Architecture]]
| ステータス = 開発中
| リリース =
| 初版 = {{release date and age|2009}}
| frequently updated = yes <!-- バージョンを更新するときはこのページを編集せず、番号部分をクリックしてその先のテンプレートで番号と日付を更新してください -->
| プログラミング言語 = [[C++]], [[JavaScript]]
| 種別 = [[イベント駆動型プログラミング|イベント駆動型]]
| ライセンス = [[MIT License]]
| 公式サイト = [{{URL|1=https://nodejs.org/ nodejs.org]}}
}}
 
'''Node.js'''(ノード・ジェイエス) は[[V8 (JavaScriptエンジン)|V8 JavaScriptエンジン]]上に構築された[[JavaScript]]実行環境の1つである<ref>Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. [https://nodejs.org/en/ Node.js]</ref>。[[イベント駆動型プログラミング|イベント化]]された[[入出力]]を扱う[[サーバサイドスクリプト|サーバサイド]][[JavaScript]]環境であり、[[Webサーバ]]などの[[スケーラビリティ|スケーラブル]]な[[コンピュータネットワーク|ネットワーク]][[プログラム (コンピュータ)|プログラム]]の記述を意図している<ref>http://www.readwriteweb.com/hack/2011/01/wait-whats-nodejs-good-for-aga.php</ref>。[[ライアン・ダール]]によって[[2009年]]に作成され、ダールを雇用している[[Joyent]]の支援により成長している<ref>http://mashable.com/2011/03/10/node-js/</ref>
<ref name="Node.js pushes JavaScript to the server-side">{{Cite web
|url= http://www.sdtimes.com/NODE_JS_PUSHES_JAVASCRIPT_TO_THE_SERVER_SIDE/By_Alex_Handy/About_JAVASCRIPT_and_NODEJS/35668
31行目:
[[V8 (JavaScriptエンジン)|V8 JavaScriptエンジン]]で動作するが、[[Chakra#ChakraCore|ChakraCore]]バージョンやMozillaによるSpiderMonkey移植のプロジェクトも存在する。
 
Node.jsは[[Python]]の[[Twisted]]、[[Perl]]の{{仮リンク|Perl Object Environment|en|Perl Object Environment}}、[[C言語]]の{{仮リンク|libevent|en|libevent}}、[[Ruby]]の[[{{仮リンク|EventMachine]]|en|EventMachine}}と同様の目的を持つ。
ほとんどの[[JavaScript]]とは異なり、[[ウェブブラウザ]]の中で実行されるのではなく、むしろサーバサイドJavaScriptの一種である。
Node.jsはいくつかの[[CommonJS]]仕様を実装している<ref>http://wiki.commonjs.org/wiki/Implementations/node.js</ref>。
51行目:
</syntaxhighlight>
 
3000番[[ポート番号|ポート]] 3000番で接続を待ち受けて、送信され受け取ったデータを[[エコー_(コンピュータ)#エコーバック|エコーバック]]する単純な[[Transmission Control Protocol|TCP]]サーバ:
<syntaxhighlight lang="javascript">
const net = require('net');
87行目:
// 1 !== 2
</syntaxhighlight>
 
=== ECMAScript modules ===
Node.jsは ECMAScript modules (ES module) に対応しており<ref>"Node.js fully supports ECMAScript modules" ''[https://nodejs.org/docs/latest-v16.x/api/esm.html#modules-ecmascript-modules Modules: ECMAScript modules]''. Node.js v16.19.1 documentation. 2023-02-19閲覧.</ref>、以下のいずれかを満たすものをES moduleとしてロードする<ref>"Node.js will treat the following as ES modules ... Files with an <code>.mjs</code> extension ... Files with a <code>.js</code> extension when the nearest parent <code>package.json</code> file contains a top-level <code>"type"</code> field with a value of <code>"module"</code>. ... as an argument ... with the flag <code>--input-type=module</code>." ''[https://nodejs.org/docs/latest-v16.x/api/packages.html#determining-module-system Modules: Packages]''. Node.js v16.19.1 documentation. 2023-02-19閲覧.</ref>。
 
* 拡張子が <code>.mjs</code> であるファイル
* 拡張子が <code>.js</code> かつ最近傍の親 <code>package.json</code> で <code>"type":"module"</code> が指定されたファイル
* <code>--input-type=module</code> フラグと共に引数として渡されたモジュール文字列
 
== リリース ==
Node.jsは長期サポート(LTS) (LTS) リリースモデルを採用している。
 
各メジャーバージョンは''Pending'' -> ''Current'' -> (''Active TLSLTS'' -> ''Maintenance TLSLTS'' ->) ''End of Life'' のリリース状態を経る。Currentリリースは6ヶ月間続き、奇数バージョンはその後''Maintenance LTS''のみを経ることなくサポートが終了し、偶数バージョンは''Active LTS''を経て''Maintenance LTS''へ移行する。プロダクションアプリケーションは ''Active TLSLTS'' あるいは ''Maintenance TLSLTS'' のいずれかのみを利用しなければならない<ref>Production applications should only use ''Active LTS'' or ''Maintenance LTS'' releases. [https://nodejs.org/ja/about/releases/#releases Node.js]</ref>。
 
<!-- Template:Version - for version & release history. Documentation and examples: http://en.wikipedia.org/wiki/Template:Version -->
151 ⟶ 158行目:
| {{Version|o|8.x}}
| {{Version|o|End-of-Life}}
| [[Carbon (API)|Carbon]]
| 2017-05-30
| 2017-10-31
164 ⟶ 171行目:
| 2018-06-30
|-
| {{Version|coo|10.x}}
| {{Version|coo|Maintenance LTSEnd-of-Life}}
| [[Dubnium]]
| 2018-04-24
175 ⟶ 182行目:
| {{Version|o|End-of-Life}}
|
| 2018-10-23
| colspan="2" |N/A
| 2019-05-01
| 2019-06-01
|-
| {{Version|coo|12.x}}
| {{Version|coo|Active LTSEnd-of-Life}}
| [[Erbium]]
| 2019-04-23
| 2019-10-2221
| 2020-1011-2030
| 2022-04-0130
|-
| {{Version|o|13.x}}
195 ⟶ 203行目:
| 2020-06-01
|-
| {{Version|co|14.x}}
| {{Version|co|CurrentEnd-of-Life}}
| [[Fermium]]
| 2020-04-21
| 2020-10-2027
| 2021-10-2019
| 2023-04-30
|-
| {{Version|po|15.x}}
| {{Version|po|PendingEnd-of-Life}}
|
| 2020-10-20
211 ⟶ 219行目:
| 2021-06-01
|-
| {{Version|po|16.x}}
| {{Version|po|PendingEnd-of-Life}}
| [[Gallium]]
| 2021-04-20
| 2021-10-26
| 2022-10-18
| 2023-09-11<ref>{{cite web | url=https://nodejs.org/en/blog/announcements/nodejs16-eol/ | accessdate = 15 February 2023|title=Bringing forward the End-of-Life Date for Node.js 16}}</ref>
| 2024-04-30
|-
| {{Version|o|17.x}}
| {{Version|o|End-of-Life}}
|
| 2021-10-19
| N/A
| 2022-04-01
| 2022-06-01
|-
| {{Version|co|18.x}}
| {{Version|co|Maintenance}}
| [[Hydrogen]]
| 2022-04-19
| 2022-10-25
| 2023-10-18
| 2025-04-30
|-
| {{Version|o|19.x}}
| {{Version|o|End-of-Life}}
|
| 2022-10-18
| N/A
| 2023-04-01
| 2023-06-01
|-
| {{Version|co|20.x}}
| {{Version|co|Active LTS}}
| [[Iron]]
| 2023-04-18
| 2023-10-24
| 2024-10-22
| 2026-04-30
|-
| {{Version|c|21.x}}
| {{Version|c|Current}}
|
| 2023-10-17
| N/A
| 2024-04-3001
| 2024-06-01
|-
| {{Version|p|22.x}}
| {{Version|p|Pending}}
|
| 2024-04-23
| 2024-10-29
| 2025-10-21
| 2027-04-30
|-
| {{Version|p|23.x}}
| {{Version|p|Pending}}
|
| 2024-10-15
| N/A
| 2025-04-01
| 2025-06-01
|-
| {{Version|p|24.x}}
| {{Version|p|Pending}}
|
| 2025-04-22
| 2025-10-28
| 2026-10-20
| 2028-04-30
|-
| colspan="7" | <small>{{Version |l |show=111101}}</small>
225 ⟶ 297行目:
 
== コミュニティ ==
主に2つのメーリングリスト [httphttps://groups.google.com/groupg/nodejs nodejs] と [httphttps://groups.google.com/groupg/nodejs-dev nodejs-dev] 、そして [[freenode]]上の [[インターネット・リレー・チャット|IRC]] チャンネル #node.js を中心とするとても活発な開発者コミュニティが存在する。コミュニティはNode.jsにフォーカスした開発者会議であるNodeConfに集結する<ref>http://www.readwriteweb.com/hack/2011/04/nodeconf-schedule-announced.php</ref>。
 
== Windows版 ==
232 ⟶ 304行目:
== クライアント1万台問題 ==
 
非同期処理のNode.jsでは{{仮リンク|[[クライアント1万台問題|en|C10k problem}}]]は起きない<ref><!-- 出典:日経コンピュータ2011年12月22日号 とのこと -->{{Cite web|和書|title=スタバ方式で「C10K問題」を解消|url=httphttps://itproxtech.nikkeibpnikkei.co.jpcom/it/article/COLUMN/20120725/411441/|date=2012-07-31|accessdate=2017-02-20|publisher=日経BP社|work=日経コンピュータ|author=福田崇男}}</ref>。
 
Node.jsでこの問題を解決した技術の中核は、シングルスレッドにおける非同期処理を容易に実装可能にしたイベント駆動型プログラミング環境である。
254 ⟶ 326行目:
* [[Deno]]
* [[MEAN (ソフトウェアバンドル)]]
* [[Bun (ソフトウェア)]]
 
== 外部リンク ==
*[ {{Official website|https://nodejs.org/ 公式ウェブサイト]en/}} {{ref-enEn icon}}
* {{Twitter|nodejs|Node.js}}
*[https://github.com/nodejs/node ソースリポジトリ]
* {{GitHub|nodejs/node}}
* [https://nodejs.jp/ Node.js 日本ユーザグループ]
 
{{JavaScript}}
{{Node.js}}
{{authority control}}
[[Category:JavaScript]]