Skip to content

Commit e64c6f2

Browse files
committed
Removed unneeded index.jsx. Made self-update a little smarter.
1 parent 979ddff commit e64c6f2

File tree

8 files changed

+1328
-1964
lines changed

8 files changed

+1328
-1964
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# sails-react-bootstrap-webpack
22

3-
[![Travis CI status](https://img.shields.io/travis/com/neonexus/sails-react-bootstrap-webpack.svg?branch=release&logo=travis)](https://app.travis-ci.com/github/neonexus/sails-react-bootstrap-webpack)
4-
[![Sails version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv5.3.4%2Fpackage.json&query=%24.dependencies.sails&label=Sails&logo=sailsdotjs)](https://sailsjs.com)
5-
[![React version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv5.3.4%2Fpackage.json&query=%24.devDependencies.react&label=React&logo=react)](https://react.dev)
6-
[![Bootstrap version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv5.3.4%2Fpackage.json&query=%24.devDependencies.bootstrap&label=Bootstrap&logo=bootstrap&logoColor=white)](https://getbootstrap.com)
7-
[![Webpack version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv5.3.4%2Fpackage.json&query=%24.devDependencies.webpack&label=Webpack&logo=webpack)](https://webpack.js.org)
3+
[//]: # ([![Travis CI status](https://img.shields.io/travis/com/neonexus/sails-react-bootstrap-webpack.svg?branch=release&logo=travis)](https://app.travis-ci.com/github/neonexus/sails-react-bootstrap-webpack))
4+
[![Sails version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv6.0.0%2Fpackage.json&query=%24.dependencies.sails&label=Sails&logo=sailsdotjs)](https://sailsjs.com)
5+
[![React version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv6.0.0%2Fpackage.json&query=%24.devDependencies.react&label=React&logo=react)](https://react.dev)
6+
[![Bootstrap version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv6.0.0%2Fpackage.json&query=%24.devDependencies.bootstrap&label=Bootstrap&logo=bootstrap&logoColor=white)](https://getbootstrap.com)
7+
[![Webpack version](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fneonexus%2Fsails-react-bootstrap-webpack%2Fv6.0.0%2Fpackage.json&query=%24.devDependencies.webpack&label=Webpack&logo=webpack)](https://webpack.js.org)
88

99
[//]: # ([![Codecov](https://img.shields.io/codecov/c/github/neonexus/sails-react-bootstrap-webpack?logo=codecov)](https://codecov.io/gh/neonexus/sails-react-bootstrap-webpack))
1010

@@ -16,7 +16,7 @@ A virtual start-up in a box!
1616

1717
## Quick Install
1818

19-
NOTE: You will need access to a MySQL / MariaDB database for the setup. If you want to use a different datastore, you'll need to configure it manually.
19+
NOTE: You will need access to a MySQL / MariaDB database for the quick setup. If you want to use a different datastore, you'll need to configure it manually.
2020

2121
[Aiven.io](https://aiven.io) has FREE (no CC required) secure MySQL (5 GB), and Redis (1 GB). Both require use of SSL, and can be restricted to specified IPs. (If you are having trouble finding the
2222
FREE instances, you need to select Digital Ocean as the cloud provider.) Use my [referral link](https://console.aiven.io/signup?referral_code=mk36ekt3wo1dvij7joon) to signup, and you'll get $100
@@ -29,6 +29,10 @@ npm run setup
2929
npm run start OR npm run ngrok
3030
```
3131

32+
NOTE: `drfg` is a secondary, standalone script I've been working on, which can be used for your own projects: [Download Release From GitHub](https://www.npmjs.com/package/drfg). It downloads
33+
/ extracts / installs a release from a GitHub repo. (Currently only supports public repos...) `npx` if you weren't aware, downloads / runs NPM packages; comes standard with `npm`
34+
(at least, as of v5.2.0).
35+
3236
## Table of Contents
3337

3438
* [Main Features](#main-features)

assets/src/index.jsx

Lines changed: 0 additions & 27 deletions
This file was deleted.

config/routes.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,26 @@ const fs = require('fs');
1313
const express = require('express'); // Express is a requirement of Sails.
1414

1515
module.exports.routes = {
16-
'GET /': {
17-
skipAssets: true,
18-
fn: (req, res) => {
19-
return res.redirect(302, '/main'); // redirect to the "main" React app (the marketing site)
20-
}
21-
},
16+
// 'GET /': {
17+
// skipAssets: true,
18+
// fn: (req, res) => {
19+
// return res.redirect(302, '/main'); // redirect to the "main" React app (the marketing site)
20+
// }
21+
// },
2222

2323
'GET /*': { // default route used to auto switch React apps
2424
skipAssets: false,
2525
fn: [
2626
express.static(path.resolve(__dirname, '../.tmp/public/')),
2727
async (req, res) => {
2828
// This will determine which React app we need to serve.
29-
const parts = req.url.split('/');
29+
let url = req.url;
30+
31+
if (url === '/') {
32+
url = '/main'; // Default to "main"
33+
}
34+
35+
const parts = url.split('/');
3036
const pathToCheck = path.join(__dirname, '../.tmp/public/', parts[1], '/index.html');
3137

3238
if (fs.existsSync(pathToCheck)) {

0 commit comments

Comments
 (0)