Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/site/pages/es/about/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ El hecho de que Node.js esté diseñado sin hilos no significa que no puedas ace
[`child_process.fork()`]: https://nodejs.org/api/child_process.html
[`cluster`]: https://nodejs.org/api/cluster.html
[máquina de eventos]: https://github.com/eventmachine/eventmachine
[twisted]: https://twisted.org/
[torcido]: https://twisted.org/
2 changes: 1 addition & 1 deletion apps/site/pages/id/about/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ Node.js dirancang tanpa thread bukan berarti Anda tidak dapat memanfaatkan banya
[`child_process.fork()`]: https://nodejs.org/api/child_process.html
[`cluster`]: https://nodejs.org/api/cluster.html
[event machine]: https://github.com/eventmachine/eventmachine
[berpilin]: https://twisted.org/
[twisted]: https://twisted.org/
2 changes: 1 addition & 1 deletion apps/site/pages/ja/about/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ layout: about

Node.js®とは

非同期イベント駆動型のJavaScript実行環境であるNode.jsはスケーラブルなネットワークアプリケーションを構築するために設計されています。次の「hello world」の例では、多数のネットワーク接続を同時に処理できます。各ネットワーク接続時にコールバックが起動されますが、実行する処理がない場合、Node.jsはスリープします。
非同期イベント駆動型のJavaScript実行環境であるNode.jsはスケール可能なネットワークアプリケーションを構築するために設計されています。次の「hello world」の例では多数のネットワーク接続を同時に処理できます。各ネットワーク接続でコールバックが呼び出されますが、実行する処理がない場合はNode.jsはスリープします。

```cjs
const { createServer } = require('node:http');
Expand Down
16 changes: 15 additions & 1 deletion apps/site/pages/uk/about/previous-releases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,22 @@ layout: about

### Комерційна підтримка

Комерційна підтримка для версій після фази підтримки доступна з нашим партнером програми OpenJS Ecosystem Sustainability [HeroDevs](https://herodevs.com/).
Комерційна підтримка для версій після фази _Maintenance_ доступна з нашим партнером програми OpenJS Ecosystem Sustainability [HeroDevs](https://herodevs.com/).

## Шукаєте останній реліз гілки версії?

<DownloadReleasesTable />

## Офіційні та спільнотні методи установки

Вебсайт Node.js пропонує різні методи установки, з якими можна встановити Node.js неінтерактивно. Наприклад, за допомогою інтерфейсів командного рядка, менеджерів пакетів ОС (як-от `apt`) або менеджерів версій Node.js (як-от `nvm`).

Аби популяризувати та прорекламувати внески спільноти, проєкт Node.js представив нову сторінку завантажень, яка містить і офіційні, і спільнотні методи установки, що надає більше гнучкості та опцій для користувачів.
Разом з цим ми представили концепцію «офіційних» та «спільнотних» методів установки. Щоб метод уважався «офіційним», він повинний відповідати наступним вимогам:

| Вимоги |
| ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Нові релізи Node.js повинні бути доступні одразу після офіційного релізу |
| Супроводжувачі проєкту повинні мати близькі зв'язки з Node.js, у тому числі пряме спілкування |
| Метод установки завантажує офіційні бінарні файли, зібрані проєктом Node.js |
| Метод установки **не** повинний будувати з вихідного коду, коли доступні бінарні файли, та не повинний змінювати офіційні бінарні файли, надані Node.js |
24 changes: 17 additions & 7 deletions apps/site/pages/zh-tw/about/get-involved/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,32 @@ layout: about

# 加入我們

若您對於參與 Node.js 社群感興趣,有許多管道可以參與。Node.js 專案是一個龐大且多元的社群,除了撰寫程式碼以外,還有許多貢獻方式。

## 社群討論

- [GitHub 問題清單](https://github.com/nodejs/node/issues) 是討論 Node.js 核心功能的區域。
- 若要進行 Node.js 開發相關的即時聊天,請使用以下其中一個平台
- 針對 IRC,請使用 [IRC 客戶端](https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients)連線至 `#node.js` 頻道中的 `irc.libera.chat`,或使用[網頁客戶端](https://kiwiirc.com/nextclient/)透過瀏覽器連線至該頻道。
- 針對 Slack,則有兩種選項:
- [OpenJSF Slack](https://slack-invite.openjsf.org/) 乃是由基金會經營的 Slack ,其中包含多個 Node.js 頻道 (以 #nodejs- 為前綴的頻道皆與該專案相關)。
- [Node Slackers](https://www.nodeslackers.com/) 是一個專注於 Node.js 的 Slack 社群。
- [GitHub 議題列表](https://github.com/nodejs/node/issues) 是討論 Node.js 核心功能的地方。若您對 Node.js 有疑問,可以使用 [GitHub discussions](https://github.com/orgs/nodejs/discussions)。
- [`nodejs/help`](https://github.com/nodejs/help/issues) 是專為討論 Node.js 問題的儲存庫。
- Node.js 的官方 Twitter 帳號是 [nodejs](https://twitter.com/nodejs)。
- [Node.js 專案行事曆](https://nodejs.org/calendar)包含所有公開的團隊會議。

## 學習素材
## 學習資源

如果您想要瞭解更多與 Node.js 有關的事,以下有許多可供利用的資源。

- Node.js 網站的[官方學習區](https://nodejs.org/en/learn/)。
- [官方 API 參考文件](https://nodejs.org/api/)。
- [NodeSchool.io](https://nodeschool.io/) 會透過命令列遊戲傳授 Node.js 的概念。
- [Stack Overflow 的 Node.js 標籤](https://stackoverflow.com/questions/tagged/node.js)每天都會收集最新資訊。
- [The DEV Community Node.js tag](https://dev.to/t/node) 是供開發者分享 Node.js 專案、文章與教學,以及討論 Node.js 相關主題、收集他人意見的地方。無論程度如何都歡迎踴躍參與。
- [Reddit Node.js community](https://www.reddit.com/r/node) 是開發者們分享 Node.js 專案、文章與教學,以及討論 Node.js 相關主題、收集他人意見的地方。無論程度如何都歡迎踴躍參與。

## 非官方討論區

如果您想在一些非正式的地方討論 Node.js,以下有一些非官方的討論區。請留意這些討論區並非由 Node.js 專案認可,同時也請遵守他們的社群公約。

- [Node Slackers](https://www.nodeslackers.com/) 是一個專注於 Node.js 的 Slack 社群。
- [OpenJSF Slack](https://slack-invite.openjsf.org/) 是 OpenJS 基金會的 Slack 工作區,有一些與 Node.js 相關的頻道(以 `#nodejs-` 開始的頻道皆與本專案相關)。
- [Nodeiflux](https://discordapp.com/invite/vUsrbjd) 是一個友善的 Node.js 後端開發者社群,成員們在 Discord 上相互支援。
- [ES Community](https://discord.gg/zJsuc6vvhn) 是一個在 Discord 上的法語 JavaScript 社群。
- 使用 [IRC 客戶端](https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients)連線至 `#node.js` 頻道中的 `irc.libera.chat`,或使用[網頁客戶端](https://kiwiirc.com/nextclient/)透過瀏覽器連線至該頻道。
4 changes: 2 additions & 2 deletions apps/site/pages/zh-tw/about/security-reporting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ layout: about

Node.js 專案為安全研究人員和盡責公開揭露設立了官方漏洞獎勵計畫。該計畫透過 HackerOne 平台進行管理。詳情請見 [https://hackerone.com/nodejs](https://hackerone.com/nodejs)。

## 回報第三方模塊的錯誤
## 回報第三方模組中的臭蟲

第三方模塊的錯誤應回報給其相應維護者
第三方模組的安全性臭蟲應回報給其相應的維護者

## 揭露政策

Expand Down
246 changes: 125 additions & 121 deletions apps/site/pages/zh-tw/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,130 +4,134 @@ layout: home
---

<section>
<WithBadge section="index" />

<div>
<h1 className="special">隨時隨地執行 JavaScript</h1>

Node.js® 是一款免費的跨平台開源 JavaScript 執行環境,供開發者建立伺服器、網頁應用程式
命令列工具與腳本。

</div>

<div>
<WithNodeRelease status={['LTS']}>
{({ release }) => (
<>
<DownloadButton release={release}>下載 Node.js (LTS)</DownloadButton>
<small>
下載享有長期支援功能的 Node.js <b>{release.versionWithPrefix}</b>
<sup title="Downloads a Node.js installer for your current platform">1</sup>。
Node.js 也可以透過 <Link href="/download/package-manager">套件管理器</Link> 安裝。
</small>
</>
)}
</WithNodeRelease>

<WithNodeRelease status={['Current']}>
{({ release }) => (
<WithBadge section="index" />

<div>
<h1 className="special">隨時隨地執行 JavaScript</h1>

Node.js® 是一款免費的跨平台開源 JavaScript 執行環境,供開發者建立伺服器、網頁應用程式、命令列工具與指令稿。

</div>

<div>
<WithNodeRelease status={['LTS']}>
{({ release }) => (
<>
<DownloadButton release={release}>下載 Node.js (LTS)</DownloadButton>
<small>
想要更快體驗新功能嗎?
那就下載 <b>Node.js <DownloadLink release={release}>{release.versionWithPrefix}</DownloadLink></b>
<sup title="Downloads a Node.js installer for your current platform">1</sup> 吧
下載享有長期支援的 Node.js <b>{release.versionWithPrefix}</b>
<sup title="下載適用於您目前平台的 Node.js 安裝程式">1</sup>。
您也可以透過<Link href="/download/package-manager">套件管理程式</Link>來安裝 Node.js
</small>
)}
</WithNodeRelease>

</div>
</>
)}
</WithNodeRelease>

<WithNodeRelease status={['Current']}>
{({ release }) => (
<small>
想要更快體驗新功能嗎?
那就下載 <b>Node.js <DownloadLink release={release}>{release.versionWithPrefix}</DownloadLink></b>
<sup title="Downloads a Node.js installer for your current platform">1</sup> 吧。
</small>
)}
</WithNodeRelease>
</div>
</section>

<section>
<div>
```js displayName="Create an HTTP Server"
// server.mjs
import { createServer } from 'node:http';

const server = createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello World!\n');
});

// starts a simple http server locally on port 3000
server.listen(3000, '127.0.0.1', () => {
console.log('Listening on 127.0.0.1:3000');
});

// run with `node server.mjs`
```

```js displayName="Write Tests"
// tests.mjs
import assert from 'node:assert';
import test from 'node:test';

test('that 1 is equal 1', () => {
assert.strictEqual(1, 1);
});

test('that throws as 1 is not equal 2', () => {
// throws an exception because 1 != 2
assert.strictEqual(1, 2);
});

// run with `node tests.mjs`
```

```js displayName="Read and Hash a File"
// crypto.mjs
import { createHash } from 'node:crypto';
import { readFile } from 'node:fs/promises';

const hasher = createHash('sha1');

hasher.setEncoding('hex');
// ensure you have a `package.json` file for this test!
hasher.write(await readFile('package.json'));
hasher.end();

const fileHash = hasher.read();

// run with `node crypto.mjs`
```

```js displayName="Streams Pipeline"
// streams.mjs
import { pipeline } from 'node:stream/promises';
import { createReadStream, createWriteStream } from 'node:fs';
import { createGzip } from 'node:zlib';

// ensure you have a `package.json` file for this test!
await pipeline
(
createReadStream('package.json'),
createGzip(),
createWriteStream('package.json.gz')
);

// run with `node streams.mjs`
```

```js displayName="Work with Threads"
// threads.mjs
import { Worker, isMainThread,
workerData, parentPort } from 'node:worker_threads';

if (isMainThread) {
const data = 'some data';
const worker = new Worker(import.meta.filename, { workerData: data });
worker.on('message', msg => console.log('Reply from Thread:', msg));
} else {
const source = workerData;
parentPort.postMessage(btoa(source.toUpperCase()));
}

// run with `node threads.mjs`
```

</div>
我們提供大量[學習資源](/learn),探索 Node.js 的無限潛能。
<div>
```js displayName="Create an HTTP Server"
// server.mjs
import { createServer } from 'node:http';

const server = createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello World!\n');
});

// starts a simple http server locally on port 3000
server.listen(3000, '127.0.0.1', () => {
console.log('Listening on 127.0.0.1:3000');
});

// run with `node server.mjs`

````

```js displayName="Write Tests"
// tests.mjs
import assert from 'node:assert';
import test from 'node:test';

test('that 1 is equal 1', () => {
assert.strictEqual(1, 1);
});

test('that throws as 1 is not equal 2', () => {
// throws an exception because 1 != 2
assert.strictEqual(1, 2);
});

// run with `node tests.mjs`
````

```js displayName="Read and Hash a File"
// crypto.mjs
import { createHash } from 'node:crypto';
import { readFile } from 'node:fs/promises';

const hasher = createHash('sha1');

hasher.setEncoding('hex');
// ensure you have a `package.json` file for this test!
hasher.write(await readFile('package.json'));
hasher.end();

const fileHash = hasher.read();

// run with `node crypto.mjs`
```

```js displayName="Streams Pipeline"
// streams.mjs
import { pipeline } from 'node:stream/promises';
import { createReadStream, createWriteStream } from 'node:fs';
import { createGzip } from 'node:zlib';

// ensure you have a `package.json` file for this test!
await pipeline(
createReadStream('package.json'),
createGzip(),
createWriteStream('package.json.gz')
);

// run with `node streams.mjs`
```

```js displayName="Work with Threads"
// threads.mjs
import {
Worker,
isMainThread,
workerData,
parentPort,
} from 'node:worker_threads';

if (isMainThread) {
const data = 'some data';
const worker = new Worker(import.meta.filename, { workerData: data });
worker.on('message', msg => console.log('Reply from Thread:', msg));
} else {
const source = workerData;
parentPort.postMessage(btoa(source.toUpperCase()));
}

// run with `node threads.mjs`
```

</div>

我們提供大量[學習資源](/learn),探索 Node.js 的無限潛能。

</section>
14 changes: 14 additions & 0 deletions apps/site/snippets/ko/download/devbox.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Devbox 다운로드 및 설치:
curl -fsSL https://get.jetify.com/devbox | bash

# 프로젝트에서 Devbox 초기화
devbox init

# Node.js 다운로드 및 설치:
devbox add node@${props.release.major}

# Devbox 셸 열기
devbox shell

# Node.js 버전 확인:
node -v # Should print "${props.release.versionWithPrefix}".
14 changes: 14 additions & 0 deletions apps/site/snippets/uk/download/devbox.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Завантажує й установлює Devbox
curl -fsSL https://get.jetify.com/devbox | bash

# Ініціалізує Devbox у вашому проєкті
devbox init

# Завантажує й установлює Node.js:
devbox add node@${props.release.major}

# Відкриває оболонку Devbox
devbox shell

# Перевіряє версію Node.js:
node -v # Повинно вивести «${props.release.versionWithPrefix}».
14 changes: 14 additions & 0 deletions apps/site/snippets/zh-tw/download/devbox.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 下載並安裝 Devbox:
curl -fsSL https://get.jetify.com/devbox | bash

# 在您的專案中初始化 Devbox
devbox init

# 下載並安裝 Node.js:
devbox add node@${props.release.major}

# 啟動 Devbox shell
devbox shell

# 核對 Node.js 版本:
node -v # 應會印出 "${props.release.versionWithPrefix}"。
Loading
Loading