You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the site with the same language. Above we cloned `ru` tutorial, so:
57
+
Install local modules:
58
58
59
59
```
60
60
cd /js/javascript-tutorial-server
61
-
./edit ru
61
+
npm install
62
+
```
63
+
64
+
Run the site with the same language. Above we cloned `en` tutorial, so:
65
+
66
+
```
67
+
./edit en
62
68
```
63
69
64
-
This will import the tutorial from `/js/javascript-tutorial-ru` and start the server.
70
+
This will import the tutorial from `/js/javascript-tutorial-en` and start the server.
65
71
66
-
Wait a bit while it reads the tutorial from disk and builds static assets.
72
+
Wait a bit while it reads the tutorial from the disk and builds static assets.
67
73
68
74
Then access the site at `http://127.0.0.1:3000`.
69
75
70
76
7. Edit the tutorial
71
77
72
78
As you edit text files in the tutorial text repository (cloned at step 5),
73
-
the webpage gets reloaded automatically.
74
-
79
+
the webpage will reload automatically.
80
+
75
81
76
82
# Change server language
77
83
78
84
The server uses English by default for navigation and design.
79
85
80
86
You can set another language it with the second argument of `edit`.
81
87
82
-
E.g. import `ru` tutorial and use `ru` locale for the server
88
+
E.g. if you cloned `ru` tutorial, it makes sense to use `ru` locale for the server as well:
83
89
84
90
```
85
91
cd /js/javascript-tutorial-server
@@ -90,13 +96,13 @@ Please note, the server must support that language. There must be corresponding
90
96
91
97
# Dev mode
92
98
93
-
If you'd like to edit the server code (assuming you're familiar with Node.js), *not* the tutorial text, then there are two steps to make that easy.
99
+
If you'd like to edit the server code (assuming you're familiar with Node.js), *not* the tutorial text, then there are two steps to do.
94
100
95
101
First, run the command that imports (and caches) the tutorial:
96
102
97
103
```
98
104
cd /js/javascript-tutorial-server
99
-
NODE_LANG=en TUTORIAL_ROOT=/js/javascript-tutorial-ru npm run gulp jsengine:koa:tutorial:import
105
+
NODE_LANG=en TUTORIAL_ROOT=/js/javascript-tutorial-en npm run gulp jsengine:koa:tutorial:import
100
106
```
101
107
102
108
In the code above, `NODE_LANG` sets server language, while `TUTORIAL_ROOT` is the full path to tutorial repo, by default is `/js/javascript-tutorial-$NODE_LANG`.
@@ -123,6 +129,5 @@ Please mention OS and Node.js version.
123
129
Also please pull the very latest git code and install latest Node.js modules before publishing an issue.
0 commit comments