Skip to content

Commit a43b1b0

Browse files
committed
docs: translate ssr getting started page
1 parent 646d21d commit a43b1b0

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/guide/ssr/getting-started.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
# Getting Started
1+
# はじめに
22

3-
> This guide is currently under active development
3+
> このガイドは現在開発中です
44
5-
## Installation
5+
## インストール
66

7-
In order to create a server-side rendered application, we need to install the `@vue/server-renderer` package:
7+
サーバサイドレンダリングのアプリケーションを作成するためには、 `@vue/server-renderer` パッケージのインストールが必要です:
88

99
```bash
1010
npm install @vue/server-renderer
1111
## OR
1212
yarn add @vue/server-renderer
1313
```
1414

15-
#### Notes
15+
#### 注意点
1616

17-
- It's recommended to use Node.js version 10+.
18-
- `@vue/server-renderer` and `vue` must have matching versions.
19-
- `@vue/server-renderer` relies on some Node.js native modules and therefore can only be used in Node.js. We may provide a simpler build that can be run in other JavaScript runtimes in the future.
17+
- Node.js のバージョンは 10 以上を推奨します。
18+
- `@vue/server-renderer` `vue` のバージョンが一致する必要があります。
19+
- `@vue/server-renderer` はいくつかの Node.js ネイティブモジュールに依存しているため、 Node.js でのみ使用できます。将来的には他の JavaScript ランタイムで実行できるよりシンプルなビルドを提供するかもしれません。
2020

21-
## Rendering a Vue Application
21+
## Vue アプリケーションのレンダリング
2222

23-
Unlike a client-only Vue application, which is created using `createApp`, an SSR application needs to be created using `createSSRApp`:
23+
`createApp` で作ったクライアント専用の Vue アプリケーションとは異なり、 SSR アプリケーションは `createSSRApp` で作る必要があります:
2424

2525
```js
2626
const { createSSRApp } = require('vue')
@@ -35,7 +35,7 @@ const app = createSSRApp({
3535
})
3636
```
3737

38-
Now, we can use the `renderToString` function to render our application instance to a string. This function returns a Promise which resolves to the rendered HTML.
38+
それでは、 `renderToString` 関数を使い、アプリケーションのインスタンスを文字列にレンダリングしてみます。この関数は、レンダリングされた HTML に解決される Promise を返します。
3939

4040
```js{2,13}
4141
const { createSSRApp } = require('vue')
@@ -53,9 +53,9 @@ const app = createSSRApp({
5353
const appContent = await renderToString(app)
5454
```
5555

56-
## Integrating with a Server
56+
## サーバとの連携
5757

58-
To run an application, in this example we will use [Express](https://expressjs.com/):
58+
アプリケーションを実行するために、この例では [Express](https://expressjs.com/) を利用します:
5959

6060
```bash
6161
npm install express
@@ -96,4 +96,4 @@ server.get('*', async (req, res) => {
9696
server.listen(8080)
9797
```
9898

99-
Now, when running this Node.js script, we can see a static HTML page on `localhost:8080`. However, this code is not _hydrated_: Vue hasn't yet taken over the static HTML sent by the server to turn it into dynamic DOM that can react to client-side data changes. This will be covered in the [Client Side Hydration](hydration.html) section.
99+
この Node.js スクリプトを実行すると、 `localhost:8080` で静的な HTML ページが表示されます。しかし、このコードは _Hydrate_ ではありません: Vue はまだサーバから送られてきた静的な HTML を引き継いでいて、クライアント側のデータ変更に反応できる動的な DOM に変えていません。これについては [クライアントサイド Hydration](hydration.html) セクションで説明します。

0 commit comments

Comments
 (0)