Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374916 )

Change subject: Doc: add environment variables
......................................................................

Doc: add environment variables

- Document environment variables considered.
- Add examples for silent and verbose NPM task execution.
- Include URL protocol in staging example.
- Use "and" consistently.
- Fix typo.

Change-Id: I6cf2a5810cf0bb9d7df4831bad9674b523bd6a22
---
M docs/development.md
M docs/setting-a-staging-server.md
2 files changed, 20 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/16/374916/1

diff --git a/docs/development.md b/docs/development.md
index c239748..df8208b 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -32,7 +32,7 @@
     will detect changes and re-compile and re-launch the application, so just
     go and refresh the browser window when it is done.
 
-* To run **linting & tests**:
+* To run **linting and tests**:
   * `npm test`
   * If you want to watch files and run the linting and tests when some change,
     you can run:
@@ -40,6 +40,12 @@
 
 * To automatically format source code and fix linting errors, you can run:
   * `npm run format`
+
+* To suppress NPM-specific output, run the command with the `-s` option. e.g.:
+  * `npm -s start`.
+
+* To debug the build process, enable verbose output. e.g.:
+  * `VERBOSE=true npm run test:watch`.
 
 ## Running the production version
 
@@ -109,3 +115,12 @@
       response.status(404).send("Not found");
     });
     ```
+
+## Environment variables
+
+* `NODE_ENV`: unset or `production`; defaults to development. Controls debug
+  functionality.
+* `PORT`: unset or a natural number; defaults to 3000. Controls server port.
+* `VERBOSE`: unset or `1`; defaults to disabled. Controls build output.
+* `WEBPACK_DEV_SERVER_PORT`: unset or a natural number; defaults to 8080.
+  Controls debug client port.
diff --git a/docs/setting-a-staging-server.md b/docs/setting-a-staging-server.md
index 2267746..fda3076 100644
--- a/docs/setting-a-staging-server.md
+++ b/docs/setting-a-staging-server.md
@@ -21,8 +21,8 @@
 * Fill up the details (name)
 * Under **Source**, choose a debian based image. Debian 8.9-jessie at the time
   of writing this is the recommended one with included node source 
repositories.
-* Under **Flavor**, choose an appropiate size depending on your group's 
capacity
-  and who is going to use the server.
+* Under **Flavor**, choose an appropriate size depending on your group's
+  capacity and who is going to use the server.
 * Under **Security Groups**, add the **web** group so that web ports on the VM
   are exposed.
 * Click on **Launch Instance** and wait!
@@ -58,8 +58,8 @@
 $ nodejs -e "require('http').createServer((req, res) => res.end('hello world 
marvin')).listen(8080)"
 ```
 
-Open your browser and go to your web proxy url (ex: `marvin.wmflabs.org`), and
-you should see in your browser:
+Open your browser and go to your web proxy url (ex:
+https://marvin.wmflabs.org/), and you should see in your browser:
 
 ```
 hello world marvin

-- 
To view, visit https://gerrit.wikimedia.org/r/374916
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6cf2a5810cf0bb9d7df4831bad9674b523bd6a22
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <[email protected]>
Gerrit-Reviewer: Sniedzielski <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to