@@ -13,17 +13,17 @@ with a few Node specific changes.
13
13
14
14
Install the command line tool
15
15
16
- $ npm install -g foreman
16
+ npm install -g foreman
17
17
18
18
Get usage
19
19
20
- $ nf --help
20
+ nf --help
21
21
22
22
## Deviations from the original Foreman
23
23
24
- * Each worker has an additional automatic environment variable,
25
- ` FOREMAN_WORKER_NAME ` , that contains the process name and worker number.
26
- * example: ` web.1 ` , ` worker.1 `
24
+ * Each worker has an additional automatic environment variable,
25
+ ` FOREMAN_WORKER_NAME ` , that contains the process name and worker number.
26
+ * example: ` web.1 ` , ` worker.1 `
27
27
28
28
### How to Contribute
29
29
@@ -42,13 +42,13 @@ You are free to add features, or just help clean things up.
42
42
43
43
Node Foreman can be run with as little as ` nf start ` , as long as ` npm start ` has been defined.
44
44
For more complicated applications you will want to define a ` Procfile ` for your various server
45
- processes and and a ` .env ` file to preload environmental variables.
45
+ processes and an ` .env ` file to pre-load environmental variables.
46
46
47
47
Your module directory should end up looking like the following:
48
48
49
49
![ List Foreman Directory] ( https://raw.github.com/strongloop/node-foreman/master/assets/foreman-ls.png )
50
50
51
- Once your Procfile is defined, run your application with ` nf start ` :
51
+ Once your ` Procfile ` is defined, run your application with ` nf start ` :
52
52
53
53
![ Start Foreman] ( https://raw.github.com/strongloop/node-foreman/master/assets/foreman-start.png )
54
54
@@ -107,9 +107,9 @@ There is no need to specify which type of file you wish to use.
107
107
108
108
#### The PATH environment variable
109
109
110
- The ` PATH ` variable is given special treament and is always read
110
+ The ` PATH ` variable is given special treatment and is always read
111
111
from the environment that the ` nf ` command has been executed from,
112
- rather than a ` .env ` file. To set a different ` PATH ` execute
112
+ rather than your ` .env ` file. To set a different ` PATH ` execute
113
113
` nf ` with the ` PATH ` variable set appropriately.
114
114
115
115
``` bash
@@ -131,7 +131,6 @@ port bindings, and other passwords.
131
131
Tasks or commands that require the environment variables from the ` .env ` file
132
132
can be initiated by using ` nf run <command> ` .
133
133
134
-
135
134
### Advanced Usage
136
135
137
136
Node Foreman lets you start multiple jobs of the same type:
@@ -188,12 +187,13 @@ directory, or have foreman do it for you:
188
187
Start and stop your jobs with
189
188
190
189
$ sudo start foreman
190
+ Starting foreman... ok
191
191
$ sudo stop foreman
192
192
193
193
The export will occur with whatever environmental variables are
194
194
listed in the .env file.
195
195
196
- ### Systemd Support
196
+ ### systemd Support
197
197
198
198
_ This section is beta_
199
199
@@ -242,19 +242,19 @@ use `-a <JOBNAME>` and manage your jobs with `sudo start <JOBNAME>`.
242
242
## Reverse Proxy
243
243
244
244
Node.js processes are supposed to be stateless.
245
- Application scale by starting multiple processes that either share a socket,
245
+ Applications scale by starting multiple processes that either share a socket,
246
246
or sit behind a load balancer.
247
247
Node Foreman can help you test the parallel capabilities of your application
248
- by spawning multiple processes behind a round-robin proxy automatically .
248
+ by spawning multiple processes behind a round-robin proxy.
249
249
250
- $ nf start -x 8888 web=5
251
- [OKAY] Starting Proxy Server 8888 -> 5000-5004
250
+ $ nf start -x 8888 web=5
251
+ [OKAY] Starting Proxy Server 8888 -> 5000-5004
252
252
253
253
Access your application from port ` 8888 ` and the connections will be balanced
254
254
across the servers started from ports ` 5000 ` - ` 5004 ` .
255
255
256
256
If your application gets its port number from ` process.env.PORT ` the proxy
257
- setup will ocurr automatically.
257
+ setup will happen automatically.
258
258
259
259
### Multiple Reverse Proxies
260
260
@@ -275,15 +275,15 @@ It does however allow proxies to be bound to lower ports, such as port 80.
275
275
276
276
If you require access to a privileged port, start Node Foreman with ` sudo ` :
277
277
278
- $ sudo nf start -x 80 web=5
279
- [OKAY] Starting Proxy Server 80 -> 5000-5004
278
+ $ sudo nf start -x 80 web=5
279
+ [OKAY] Starting Proxy Server 80 -> 5000-5004
280
280
281
281
Your application will then be accessible via port 80, but it will be running as root.
282
282
283
283
## Forward Proxy
284
284
285
285
Local development and testing has huge advantages,
286
- but sometimes one needs to test web applications agains their real-world domain name.
286
+ but sometimes one needs to test web applications against their real-world domain name.
287
287
Editing ` /etc/hosts ` is a pain however, and error prone.
288
288
289
289
Node Foreman can start up an HTTP forward proxy which your browser can route requests through.
0 commit comments