Skip to content

Commit

Permalink
Added option in scripts/serve.js. Updated INSTALL.MD documentation (#367
Browse files Browse the repository at this point in the history
)

Signed-off-by: Garry Cheng <[email protected]>
  • Loading branch information
thisgarryhas2rs authored Mar 3, 2021
1 parent 13f0b26 commit 3039a83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ increase the system-wide limit:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
```

## Unsigned SSL Certificates for sensu-backend
In development, you might not have a signed CA certificate for the API URL for the sensu backend. Set this environment variable (`NODE_PROXY_SECURE`) to false to turn off SSL cert verification.

```bash
NODE_PROXY_SECURE=false NODE_ENV=development PORT=5000 API_URL=https://my-sensu-backend-api:8080 yarn node scripts serve --modules-folder /opt/sensu/yarn/node_modules
```

## Running in Production

In production, you probably don't want the source code files owned by the
Expand Down
1 change: 1 addition & 0 deletions scripts/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ app.use(compression());
app.use(
createProxyMiddleware(proxyPaths, {
target: apiUrl,
secure: process.env.NODE_PROXY_SECURE === "false" ? false : true,
logLevel: process.env.NODE_ENV === "development" ? "silent" : "info",
}),
);
Expand Down

0 comments on commit 3039a83

Please sign in to comment.