|
4 | 4 |
|
5 | 5 | This is an opinionated base [Sails v1](https://sailsjs.com) application, using Webpack to handle Bootstrap (SASS) and React.
|
6 | 6 |
|
| 7 | +# Branch Warning |
| 8 | +The `master` branch is experimental, and the [release branch](https://github.com/neonexus/sails-react-bootstrap-webpack/tree/release) (or the [`releases section`](https://github.com/neonexus/sails-react-bootstrap-webpack/releases)) is where one should base their use of this template. |
| 9 | + |
| 10 | +`master` is **volatile**, likely to change at any time, for any reason; this includes `git push --force` updates. |
| 11 | + |
| 12 | +**FINAL WARNING: DO NOT RELY ON THE MASTER BRANCH!** |
| 13 | + |
7 | 14 | ## Main Features
|
8 | 15 |
|
9 | 16 | + Automatic (incoming) request logging, via Sails models / hooks.
|
@@ -31,16 +38,18 @@ This repo is not installable via `npm`. Instead, Github provides a handy "Use th
|
31 | 38 | |npm run coverage | Runs [NYC](https://www.npmjs.com/package/nyc) coverage reporting of the Mocha tests, which generates HTML in `test/coverage`.
|
32 | 39 |
|
33 | 40 | ### Environment Variables used for remote servers:
|
34 |
| -| Variable | DEV default | PROD default | Description |
35 |
| -|------------|----------------------|-------------------------|---------------------- |
36 |
| -| ASSETS_URL | "" (empty string) | "" (empty string) | Webpack is configured to modify static asset URLs to point to a CDN, like CloudFront. MUST end with a slash " / ". |
37 |
| -| BASE_URL | https://myapi.app | https://myapi.app | The address of the Sails instance. |
38 |
| -| DB_HOST | localhost | localhost | The hostname of the datastore. |
39 |
| -| DB_USER | root | produser | Username for the datastore. |
40 |
| -| DB_PASS | mypass | myprodpassword | Password for the datastore. |
41 |
| -| DB_NAME | myapp | proddatabase | The name of the database inside the datastore. |
42 |
| -| DB_PORT | 3306 | 3306 | The port number for datastore. |
43 |
| -| DB_SSL | false | false | If the datastore requires SSL, set this to "true". |
| 41 | +| Variable | DEV default | PROD default | Description |
| 42 | +|-----------------------|-------------------|-------------------|---------------------- |
| 43 | +| ASSETS_URL | "" (empty string) | "" (empty string) | Webpack is configured to modify static asset URLs to point to a CDN, like CloudFront. MUST end with a slash " / ", or be empty. |
| 44 | +| BASE_URL | https://myapi.app | https://myapi.app | The address of the Sails instance. |
| 45 | +| DB_HOST | localhost | localhost | The hostname of the datastore. |
| 46 | +| DB_USER | root | produser | Username for the datastore. |
| 47 | +| DB_PASS | mypass | myprodpassword | Password for the datastore. |
| 48 | +| DB_NAME | myapp | proddatabase | The name of the database inside the datastore. |
| 49 | +| DB_PORT | 3306 | 3306 | The port number for datastore. |
| 50 | +| DB_SSL | false | false | If the datastore requires SSL, set this to "true". |
| 51 | +| SESSION_SECRET | "" (empty string) | "" (empty string) | This is used to sign cookies, and SHOULD be set, especially on PRODUCTION environments. |
| 52 | +| DATA_ENCRYPTION_KEY | "" (empty string) | "" (empty string) | **Currently unused; intended for future use.** |
44 | 53 |
|
45 | 54 | ## Request Logging
|
46 | 55 | Automatic incoming request logging, is a 2 part process. First, the [`request-logger` hook](api/hooks/request-logger.js) gathers info from the request, and creates a new [`RequestLog` record](api/models/RequestLog.js), making sure to mask anything that may be sensitive, such as passwords. Then, a custom response gathers information from the response, again, scrubbing sensitive data (using the [customToJSON](https://sailsjs.com/documentation/concepts/models-and-orm/model-settings?identity=#customtojson) feature of Sails models) to prevent leaking of password hashes, or anything else that should never be publicly accessible. The [`keepModelsSafe` helper](api/helpers/keep-models-safe.js) and the custom responses (such as [ok](api/responses/ok.js) or [serverError](api/responses/serverError.js)) are responsible for the final leg of request logs.
|
|
0 commit comments