|
1 | 1 | <a name="Chapter2"></a> |
2 | | -# Chapter 2 - (Optional) Extend your web server to support upload/translation |
| 2 | +# Chapter 2 – (Optional) Extend your web server to support upload/translation |
3 | 3 |
|
4 | 4 | - [Choose your option](#Options) |
5 | 5 | - [Translating from the client](chapter-2a.md#Chapter2a) |
6 | 6 | - [Translating from the server](chapter-2b.md#Chapter2b) |
7 | 7 |
|
8 | 8 |
|
9 | | -You already uploaded and translated a model earlier in this tutorial, so adding support for uploading/translating to your node.js server is optional. |
10 | | -If you want to add it now, choose your option below and follow the instructions there. |
11 | | -Or you can come back and work through that later, if you prefer. |
| 9 | +You already uploaded and translated one model earlier in this tutorial, so adding support for uploading/translating to your node.js server is optional. |
| 10 | +For instance, it might be important if your use case involves numerous models and you would like to implement support for automatic upload and translation. |
| 11 | +If you want to add it now, choose your option below and follow the instructions there. |
| 12 | +You can also come back and work through this step later, if you prefer. |
12 | 13 |
|
13 | | -Once you've finished that additional tutorial, or if you chose to skip it, move on to the next section - ['Customize the Viewer Behavior'](chapter-3.md#Chapter3). |
| 14 | +After you've finished or skipped this optional step, move on to the next section – ['Customize the Viewer Behavior'](chapter-3.md#Chapter3). |
14 | 15 |
|
15 | 16 |
|
16 | 17 | <a name="Options"></a> |
17 | 18 | ## Choose your option |
18 | 19 |
|
19 | 20 | Before you decide if you want to handle translation in your web application, you first need to decide if you want to do the translation from the server or the client. |
20 | 21 | The only important step was to make sure the access token was generated on the server side to avoid anyone to steal your consumer key and secret. |
21 | | -That step was done in the previous steps. Now, once you have a valid access token, you can do the translation either on the client (JavaScript code running |
22 | | -in the browser) or on the server (JavaScript code running on the node.js server). The path you choose depends on what you want to achieve. Running on the client |
23 | | -side means no files are transitioning via your server, and you aren’t using any server CPU time. Running from the server means that you control everything your |
| 22 | +That step was done in the previous steps. Now, once you have a valid access token, you can do the translation either on the client (JavaScript code running |
| 23 | +in the browser) or on the server (JavaScript code running on the node.js server). The path you choose depends on what you want to achieve. Running on the client |
| 24 | +side means no files are transitioning via your server, and you aren’t using any server CPU time. Running from the server means that you control everything your |
24 | 25 | users are doing. |
25 | 26 |
|
26 | | -Either choose [‘Translating from the client’](chapter-2a.md#Chapter2a) or [‘Translating from the server’](chapter-2b.md#Chapter2b) as the next step. If you've already |
27 | | -completed one of them and would like to try another, please revert back to the original status first. You can save your changes with git and checkout the master branch |
| 27 | +Either choose [‘Translating from the client’](chapter-2a.md#Chapter2a) or [‘Translating from the server’](chapter-2b.md#Chapter2b) as the next step. If you've already |
| 28 | +completed one of them and would like to try another, please revert back to the original status first. You can save your changes with git and checkout the master branch |
28 | 29 | to get a clean start point. |
29 | 30 | ``` |
30 | 31 | git checkout -b yourbranchname |
31 | 32 | git add . |
32 | 33 | git commit -am 'save my changes' |
33 | | -git checkout master -f |
| 34 | +git checkout master -f |
34 | 35 | ``` |
35 | | - |
| 36 | + |
36 | 37 | And you can use following command to bring back your changes if you want: |
37 | 38 | ``` |
38 | 39 | git checkout yourbranchname |
39 | | -``` |
| 40 | +``` |
| 41 | + |
40 | 42 |
|
41 | | - |
42 | 43 | ========================= |
43 | | -[Next](chapter-3.md#Chapter3) - |
| 44 | +[Next](chapter-3.md#Chapter3) – |
44 | 45 | [Home](README.md) |
0 commit comments