Skip to content

Commit 0636858

Browse files
authored
Merge pull request #57 from neonexus/master
Readjusted ENV variables table, once more. Updated dependencies.
2 parents 463c136 + ddcf61d commit 0636858

Some content is hidden

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

48 files changed

+143
-149
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [v3.0.2](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v3.0.1...v3.0.2) (2022-04-23)
4+
5+
### Features
6+
7+
* Rebuilt ENV variables table, again.
8+
* Updated dependencies.
9+
310
## [v3.0.1](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v3.0.0...v3.0.1) (2022-04-13)
411

512
### Features

README.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,22 @@ This is an opinionated base [Sails v1](https://sailsjs.com) application, using [
66

77
Need help? Want to hire me to build your next app or prototype? You can contact me any time via Gitter: [![Join the chat at https://gitter.im/sails-react-bootstrap-webpack/community](https://badges.gitter.im/sails-react-bootstrap-webpack/community.svg)](https://gitter.im/sails-react-bootstrap-webpack/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
88

9-
# Branch Warning
9+
## Main Features
10+
11+
+ Automatic (incoming) request logging (manual outgoing), via Sails models / hooks.
12+
+ Setup for Webpack auto-reload dev server.
13+
+ Setup so Sails will serve Webpack-built bundles as separate apps (so, a marketing site, and an admin site can live side-by-side).
14+
+ Includes [react-bootstrap](https://www.npmjs.com/package/react-bootstrap) to make using Bootstrap styles / features with React easier.
15+
+ Schema validation and enforcement for `PRODUCTION`. This repo is set up for `MySQL`. If you plan to use a different datastore, you will likely want to disable the schema validation and enforcement feature inside [`config/bootstrap.js`](config/bootstrap.js). See [schema validation and enforcement](#schema-validation-and-enforcement) for more info.
16+
17+
## Branch Warning
1018
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.
1119

1220
`master` is **volatile**, likely to change at any time, for any reason; this includes `git push --force` updates.
1321

1422
**FINAL WARNING: DO NOT RELY ON THE MASTER BRANCH!**
1523

16-
# v3.0.0 Warning
24+
## v3.0.0 Warning
1725
Moving from v5 -> v6 of the [React Router](https://reactrouter.com/) can be a serious undertaking (see [the v5 -> v6 migration guide](https://reactrouter.com/docs/en/v6/upgrading/v5)).
1826

1927
If you would like to use v5 of React Router, make sure you are cloning [v2 of this repo](https://github.com/neonexus/sails-react-bootstrap-webpack/tree/v2.0.0).
@@ -28,14 +36,6 @@ If you would like to use v5 of React Router, make sure you are cloning [v2 of th
2836

2937
See the [`package.json` for more details](package.json).
3038

31-
## Main Features
32-
33-
+ Automatic (incoming) request logging (manual outgoing), via Sails models / hooks.
34-
+ Setup for Webpack auto-reload dev server.
35-
+ Setup so Sails will serve Webpack-built bundles as separate apps (so, a marketing site, and an admin site can live side-by-side).
36-
+ Includes [react-bootstrap](https://www.npmjs.com/package/react-bootstrap) to make using Bootstrap styles / features with React easier.
37-
+ Schema validation and enforcement for `PRODUCTION`. This repo is set up for `MySQL`. If you plan to use a different datastore, you will likely want to disable the schema validation and enforcement feature inside [`config/bootstrap.js`](config/bootstrap.js). See [schema validation and enforcement](#schema-validation-and-enforcement) for more info.
38-
3939
## How to Use
4040
This repo is not installable via `npm`. Instead, GitHub provides a handy "Use this template" (green) button at the top of this page. That will create a special fork of this repo (so there is a single, init commit, instead of the commit history from this repo).
4141

@@ -66,18 +66,19 @@ There are a few environment variables that the remote configuration files are se
6666

6767
If you DO NOT like this behavior, and would prefer the variables stay the same across your environments, feel free to change them in [`config/env/development.js`](config/env/development.js) and [`config/env/production.js`](config/env/production.js)
6868

69-
| DEV Variable | DEV Default | PROD Variable | PROD Default | Description |
70-
|---------------------|-------------------|-------------------------|-----------------------|---------------------------------------------------------------------------------------------------------------------------------|
71-
| ASSETS_URL | "" (empty string) | **ASSETS_URL** | **"" (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. |
72-
| BASE_URL | https://myapi.app | **BASE_URL** | **https://myapi.app** | The address of the Sails instance. |
73-
| DB_HOST | localhost | **DB_HOSTNAME** | **localhost** | The hostname of the datastore. |
74-
| DB_USER | root | **DB_USERNAME** | **produser** | Username of the datastore. |
75-
| DB_PASS | mypass | **DB_PASSWORD** | **prodpass** | Password of the datastore. |
76-
| DB_NAME | myapp | **DB_NAME** | **prod** | The name of the database inside the datastore. |
77-
| DB_PORT | 3306 | **DB_PORT** | **3306** | The port number for the datastore. |
78-
| DB_SSL | true | **DB_SSL** | **true** | If the datastore requires SSL, set this to "true". |
79-
| SESSION_SECRET | "" (empty string) | **SESSION_SECRET** | **"" (empty string)** | This is used to sign cookies, and SHOULD be set, especially on PRODUCTION environments. |
80-
| DATA_ENCRYPTION_KEY | "" (empty string) | **DATA_ENCRYPTION_KEY** | **"" (empty string)** | **Currently unused; intended for future use.** |
69+
| Variable | Default | Description |
70+
|-------------------------------------------------------------------------|-----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
71+
| ASSETS_URL | "" (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. |
72+
| BASE_URL | https://myapi.app | The address of the Sails instance. |
73+
| **DEV:**&nbsp;&nbsp;&nbsp;&nbsp;DB_HOST<br />**PROD:**&nbsp;DB_HOSTNAME | localhost | The hostname of the datastore. |
74+
| **DEV:**&nbsp;&nbsp;&nbsp;&nbsp;DB_USER<br />**PROD:**&nbsp;DB_USERNAME | **DEV:**&nbsp;&nbsp;&nbsp;&nbsp;root <br /> **PROD:**&nbsp;produser | Username of the datastore. |
75+
| **DEV:**&nbsp;&nbsp;&nbsp;&nbsp;DB_PASS<br />**PROD:**&nbsp;DB_PASSWORD | **DEV:**&nbsp;&nbsp;&nbsp;&nbsp;mypass <br /> **PROD:**&nbsp;prodpass | Password of the datastore. |
76+
| DB_NAME | **DEV:**&nbsp;&nbsp;&nbsp;&nbsp;myapp <br /> **PROD:**&nbsp;prod | The name of the database inside the datastore. |
77+
| DB_PORT | 3306 | The port number for the datastore. |
78+
| DB_SSL | true | If the datastore requires SSL, set this to "true". |
79+
| SESSION_SECRET | "" (empty string) | Used to sign cookies, and SHOULD be set, especially on PRODUCTION environments. |
80+
81+
[//]: # (| DATA_ENCRYPTION_KEY | "" &#40;empty string&#41; | **DATA_ENCRYPTION_KEY** | **"" &#40;empty string&#41;** | **Currently unused; intended for future use.** |)
8182

8283
## Request Logging
8384
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

Comments
 (0)