Skip to content

Commit 463c136

Browse files
authored
Merge pull request #56 from neonexus/master
Created .travis.yml file. Corrected environment variables table.
2 parents 002bfa2 + 773ca75 commit 463c136

File tree

8 files changed

+29
-14
lines changed

8 files changed

+29
-14
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ config/local.js
88
.eslintignore
99
.eslintrc
1010
.tmp
11+
.travis.yml
1112

1213
README.md
1314
CHANGELOG.md

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
language: node_js
2+
node_js: '16'
3+
services: mysql
4+
before_install:
5+
- mysql -e 'CREATE DATABASE IF NOT EXISTS testing;'
6+
- mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'mypass'"

CHANGELOG.md

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

3+
## [v3.0.1](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v3.0.0...v3.0.1) (2022-04-13)
4+
5+
### Features
6+
7+
* Created the `.travis.yml` file.
8+
39
## [v3.0.0](https://github.com/neonexus/sails-react-bootstrap-webpack/compare/v2.0.0...v3.0.0) (2022-04-13)
410

511
### Features

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# sails-react-bootstrap-webpack
22

3+
[![Travis CI status](https://app.travis-ci.com/neonexus/sails-react-bootstrap-webpack.svg?branch=release)](https://app.travis-ci.com/github/neonexus/sails-react-bootstrap-webpack)
4+
35
This is an opinionated base [Sails v1](https://sailsjs.com) application, using [Webpack](https://webpack.js.org) to handle [Bootstrap](https://getbootstrap.com) (using [SASS](https://sass-lang.com)) and [React](https://reactjs.org) builds. It is designed such that, one can build multiple React frontends (an admin panel, and a customer site maybe), that use the same API backend. This allows developers to easily share React components across different frontends / applications. Also, because the backend and frontend are in the same repo (and the frontend is compiled before it is handed to the end user), they can share [NPM](http://npmjs.com) libraries, like [Moment.js](https://momentjs.com)
46

57
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)
@@ -70,8 +72,8 @@ If you DO NOT like this behavior, and would prefer the variables stay the same a
7072
| BASE_URL | https://myapi.app | **BASE_URL** | **https://myapi.app** | The address of the Sails instance. |
7173
| DB_HOST | localhost | **DB_HOSTNAME** | **localhost** | The hostname of the datastore. |
7274
| DB_USER | root | **DB_USERNAME** | **produser** | Username of the datastore. |
73-
| DB_PASS | root | **DB_PASSWORD** | **produser** | Password of the datastore. |
74-
| DB_NAME | myapp | **DB_NAME** | **myapp** | The name of the database inside 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. |
7577
| DB_PORT | 3306 | **DB_PORT** | **3306** | The port number for the datastore. |
7678
| DB_SSL | true | **DB_SSL** | **true** | If the datastore requires SSL, set this to "true". |
7779
| SESSION_SECRET | "" (empty string) | **SESSION_SECRET** | **"" (empty string)** | This is used to sign cookies, and SHOULD be set, especially on PRODUCTION environments. |

assets/src/index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, {Suspense} from 'react';
22
import {createRoot} from 'react-dom/client';
33
import {
4-
BrowserRouter as Router,
4+
BrowserRouter,
55
Routes,
66
Route,
77
Navigate
@@ -14,15 +14,15 @@ function IndexApp() {
1414
// Webpack is configured to build the individual apps in their own folders in `.tmp/public` via `npm run build`.
1515
// Sails will handle the webapp redirects in remote configurations.
1616
return (
17-
<Router>
17+
<BrowserRouter>
1818
<Suspense fallback={<div>Loading...</div>}>
1919
<Routes>
2020
<Route path="/admin/*" element={<AdminRouter />} />
2121
<Route index path="/main/*" element={<Main />} />
2222
<Route path="/" element={<Navigate to="/main" />} />
2323
</Routes>
2424
</Suspense>
25-
</Router>
25+
</BrowserRouter>
2626
);
2727
}
2828

config/env/production.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ module.exports = {
5353
***************************************************************************/
5454
default: {
5555
// NEVER EVER STORE PRODUCTION CREDENTIALS IN THIS FILE!
56-
host: process.env.DB_HOSTNAME || 'localhost', // To make sure you are
57-
user: process.env.DB_USERNAME || 'fail', // aware of the environment
58-
password: process.env.DB_PASSWORD || 'nope', // you are configuring,
59-
database: process.env.DB_NAME || 'prod', // you must use HOSTNAME not HOST,
60-
port: process.env.DB_PORT || 3306, // and USERNAME not USER,
61-
ssl: (process.env.DB_SSL !== 'false') // and PASSWORD not PASS.
56+
host: process.env.DB_HOSTNAME || 'localhost', // To make sure you are
57+
user: process.env.DB_USERNAME || 'produser', // aware of the environment
58+
password: process.env.DB_PASSWORD || 'prodpass', // you are configuring,
59+
database: process.env.DB_NAME || 'prod', // you must use HOSTNAME not HOST,
60+
port: process.env.DB_PORT || 3306, // and USERNAME not USER,
61+
ssl: (process.env.DB_SSL !== 'false') // and PASSWORD not PASS.
6262
// NEVER EVER STORE PRODUCTION CREDENTIALS IN THIS FILE!
6363
}
6464
},

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sails-react-bootstrap-webpack",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "An opinionated base configuration of Sails, with Webpack for React support, and Bootstrap for styling.",
55
"keywords": [
66
"sails",

0 commit comments

Comments
 (0)