Skip to content

Commit 87eb5b6

Browse files
committed
update
1 parent a72471e commit 87eb5b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+36
-914
lines changed

INSTALL.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,32 @@ That requires to setup a plnkr session, and is not necessary to run the tutorial
142142
## 9. Run the site
143143

144144
Run the site with the language in `NODE_LANG` variable:
145+
```
146+
HOST=127.0.0.1 PORT=80 NODE_LANG=en ./dev
147+
```
148+
149+
Or with default host 127.0.0.1 and port 3000:
150+
145151
```
146152
NODE_LANG=en ./dev
147153
```
148154

149-
That builds all styles and runs the website.
155+
Then access the site.
156+
157+
If you have `127.0.0.1 javascript.in` in `/etc/hosts`, then the address will be `http://javascript.in:3000`.
150158

151-
Please note: Node.JS server is running at `127.0.0.1:3000`, but to get styles and scripts, you should use `127.0.0.1:80`
152-
Это поднимет сразу и сайт и механизмы автосборки стилей-скриптов и livereload.
159+
## 10. Run in "Edit" mode
160+
161+
In "Edit" mode the engine watches the tutorial directory, instantly picks the changes and reloads the page. Good for editing.
162+
163+
```
164+
PLUNK_REMOTE_OFF=1 NODE_LANG=en ./edit
165+
```
153166

154-
Обратите внимание: ходить на сайт нужно через Nginx (обычно порт 80), не напрямую в Node.JS (не будет статики).
167+
This uses the default `HOST=127.0.0.1`, `PORT=3000`, and the folder is `/js/javascript-tutorial-en`.
155168

156-
Если в `/etc/hosts` есть строка `127.0.0.1 javascript.in`, то адрес будет `http://javascript.in/`.
157169

158170
# TroubleShooting
159171

160-
Если что-то не работает -- [пишите issue](https://github.com/iliakan/javascript-nodejs/issues/new).
172+
If something doesn't work -- [file an issue](https://github.com/iliakan/javascript-tutorial-server/issues/new).
161173

bin/server.js

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,6 @@ co(function*() {
1616
process.exit(1); // fatal error, could not boot!
1717
});
1818

19-
process.on('message', function(msg) {
20-
if (msg == 'shutdown') { // PM2 sends this on graceful reload
21-
shutdown();
22-
}
23-
});
24-
25-
26-
function shutdown() {
27-
// The process is going to be reloaded
28-
// Have to close all database/socket.io/* connections
29-
30-
co(function*() {
31-
log.info("Closing the app...");
32-
yield* app.close();
33-
// messages below not in logs due to PM2 bug
34-
log.info("App closed");
35-
}).then(function() {
36-
log.info("Exiting");
37-
process.exit(0);
38-
}, function(err) {
39-
log.error(err);
40-
});
41-
42-
var dieDelay = process.env.PM2_GRACEFUL_TIMEOUT || 4000;
43-
// I have 4000ms to let all connections finish
44-
// not accepting new connections, closing socket.io (if used)
45-
// keep-alive connection to server may still be alive, but safe to nuke the server w/ them
46-
setTimeout(function() {
47-
log.error("App is stopping for too long! Will be killed now!");
48-
// kill is accomplished by PM2
49-
}, dieDelay - 100);
50-
51-
}
52-
5319
// отслеживаем unhandled ошибки
5420
// https://iojs.org/api/process.html#process_event_rejectionhandled
5521
var unhandledRejections = [];

docs/fontello.zip

-103 KB
Binary file not shown.

docs/sitetoolbar__logo.nominify.svg

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)