Skip to content

Commit 3342fb2

Browse files
authored
Merge pull request #39 from neonexus/master
v3.0.0-beta update (React Router v6 rewrites)
2 parents 10bc323 + 4ef8c73 commit 3342fb2

File tree

81 files changed

+7139
-4600
lines changed

Some content is hidden

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

81 files changed

+7139
-4600
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ node_modules
44
config/local.js
55
.tmp
66
.idea
7+
.github
8+
.editorconfig
79

810
README.md
11+
CHANGELOG.md
912
LICENSE

.idea/runConfigurations/Start_API.xml renamed to .idea/runConfigurations/Start_API_DEV.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Start_API_PROD.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,40 @@
11
# Changelog
22

3-
This changelog is incomplete, as it was not started until **v2** (and rehashing that far back in the past is a lot of work for very little gain). I've gone as far back as this template became "popular" (people other than me began to clone it).
3+
## [v3.0.0-beta](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v2.0.0...v2.1.0) (2021-03-19)
44

5-
# [v2.0.0](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.9.0...v2.0.0) (2021-99-99)
5+
### Features
6+
7+
* Fixed this CHANGELOG (incorrect date).
8+
* Updated Dockerfile and package.json to new Node LTS v16.13 requirement.
9+
* Fixed Dockerfile to build PROD assets, not DEV assets.
10+
* Fixed a bug in the `forceUppercaseOnFirst` function in the [`User model`](api/models/User.js).
11+
* Changed default connections to datastores to have SSL enabled (must now explicitly disable SSL connections for remote servers).
12+
* Removed use of global model names, in-favor of `sails.models` usage (for consistency, and to more easily allow disabling of global models).
13+
14+
### Breaking Changes
15+
16+
* Updated to React Router DOM v6. See: [the v5 -> v6 migration guide](https://reactrouter.com/docs/en/v6/upgrading/v5). This requires a **MAJOR** overhaul of how routes are handled.
17+
* Moved some controllers into a "common" folder, instead of the "admin" folder (as they could be used outside of admin controls).
18+
19+
### Known Issues
20+
21+
* There is an issue with the Webpack dev server, and the way React routes are handled. Currently, if you aren't loading from an entry point, nothing renders. While this is not an issue for built assets, it is an issue if you are working with the auto-reload dev server. I'm still working on a fix for this, and suspect it's an issue from moving to new React Router.
22+
23+
## [v2.0.0](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.9.0...v2.0.0) (2021-10-24)
624

725
### Features
826

9-
* Updated to Bootstrap v5. There are several **breaking changes** between [Bootstrap v4](https://getbootstrap.com/docs/4.6) and [Bootstrap v5](https://getbootstrap.com/docs/5.1), see the [migration documentation](https://getbootstrap.com/docs/5.1/migration/) for the complete list of breaking changes.
1027
* Updated all dependencies to most recent versions.
1128
* Built out more tests to get better coverage.
1229
* Created this CHANGELOG.
30+
* Fixed discrepancy between DEV and PROD environment variable names.
31+
32+
### Breaking Changes
33+
34+
* Updated to Bootstrap v5 and React-Bootstrap v2. There are several **breaking changes** between [Bootstrap v4](https://getbootstrap.com/docs/4.6) and [Bootstrap v5](https://getbootstrap.com/docs/5.1), see the [migration documentation](https://getbootstrap.com/docs/5.1/migration/) for the complete list of breaking changes. Also see [the React-Bootstrap migration guide](https://react-bootstrap.github.io/migrating/).
35+
* Changed default connections to datastores to have SSL enabled (must now explicitly disable SSL connections for remote servers).
1336

14-
# [v1.9.0](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.8.1...v1.9.0) (2020-08-30)
37+
## [v1.9.0](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.8.1...v1.9.0) (2020-08-30)
1538

1639
### Features
1740

@@ -22,27 +45,27 @@ This changelog is incomplete, as it was not started until **v2** (and rehashing
2245

2346
* Removed `<APIConsumer>`. Must now pass around a state property (or some other form of variable).
2447

25-
# [v1.8.1](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.8.0...v1.8.1) (2020-08-30)
48+
## [v1.8.1](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.8.0...v1.8.1) (2020-08-30)
2649

2750
### Features
2851

2952
* Created API token handling (bearer tokens). Should only be used over HTTPs or for local testing tools.
3053
* Added a `<noscript>` message to the entry template.
3154

32-
# [v1.8.0](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.7.0...v1.8.0) (2020-08-26)
55+
## [v1.8.0](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.7.0...v1.8.0) (2020-08-26)
3356

3457
### Features
3558

3659
* Removed need for EJS to have Sails serve the different entry points (marketing vs admin).
3760

38-
# [v1.7.0](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.6.0...v1.7.0) (2020-08-25)
61+
## [v1.7.0](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.6.0...v1.7.0) (2020-08-25)
3962

4063
### Features
4164

4265
* Created pagination helpers; one for model queries, one for API output.
4366
* Created README in `.idea` (IntelliJ) folder.
4467

45-
# [v1.6.0](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.5.2...v1.6.0) (2020-08-16)
68+
## [v1.6.0](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.5.2...v1.6.0) (2020-08-16)
4669

4770
### Features
4871

@@ -51,9 +74,11 @@ This changelog is incomplete, as it was not started until **v2** (and rehashing
5174
* Updated NPM packages.
5275
* Built better testing for project hook.
5376

54-
# [v1.5.2](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.5.1...v1.5.2) (2020-08-10)
77+
## [v1.5.2](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v1.5.1...v1.5.2) (2020-08-10)
5578

5679
### Features
5780

5881
* Fixed webpack config.
5982
* Made `isLoggedIn` policy clear cookie if not logged in.
83+
84+
This changelog is incomplete, as it was not started until **v2** (and rehashing that far back in the past is a lot of work for very little gain, the commits are there). I've gone as far back as this template became "popular" (people other than me began to clone it).

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14.8
1+
FROM node:16.13
22
MAINTAINER NeoNexus DeMortis
33

44
RUN apt-get update && apt-get upgrade -y
@@ -8,14 +8,14 @@ WORKDIR /var/www/myapp
88

99
EXPOSE 1337
1010
# REMEMBER! NEVER STORE SECRETS, DEK's, PASSWORDS, OR ANYTHING OF A SENSITIVE NATURE IN SOURCE CONTROL! USE ENVIRONMENT VARIABLES!
11-
ENV PORT=1337 DB_HOSTNAME=localhost DB_USERNAME=user DB_PASSWORD=pass DB_NAME=myappdb DB_PORT=3306 DB_SSL=true DATA_ENCRYPTION_KEY=1234abcd4321asdf0987lkjh SESSION_SECRET=0987poiuqwer1234zxcvmnbv
11+
ENV PORT=1337 DB_HOSTNAME=localhost DB_USERNAME=root DB_PASSWORD=mypass DB_NAME=myapp DB_PORT=3306 DB_SSL=true DATA_ENCRYPTION_KEY=1234abcd4321asdf0987lkjh SESSION_SECRET=0987poiuqwer1234zxcvmnbv
1212

13-
# This keeps builds more efficient, because we can use cache more effectively.
13+
# This keeps builds more efficient, because we can use Docker cache more effectively.
1414
COPY package.json /var/www/myapp/package.json
1515
RUN npm install
1616

1717
COPY . /var/www/myapp/
18-
RUN npm run build
18+
RUN npm run build:prod
1919

2020
# Expose the compiled public assets, so Nginx can route to them, instead of using Sails to do the file serving.
2121
VOLUME /var/www/myapp/.tmp/public

0 commit comments

Comments
 (0)