Compare commits

..

11 Commits

Author SHA1 Message Date
Kayne Ruse 52b755fe16 Bump dependencies 2025-09-10 14:02:40 +10:00
dependabot[bot] b1c31731ee Bump @babel/core from 7.28.0 to 7.28.4
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.28.0 to 7.28.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.28.4/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-version: 7.28.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 12:58:02 +10:00
dependabot[bot] b8cc43c556 Bump html-webpack-plugin from 5.6.3 to 5.6.4
Bumps [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) from 5.6.3 to 5.6.4.
- [Release notes](https://github.com/jantimon/html-webpack-plugin/releases)
- [Changelog](https://github.com/jantimon/html-webpack-plugin/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jantimon/html-webpack-plugin/compare/v5.6.3...v5.6.4)

---
updated-dependencies:
- dependency-name: html-webpack-plugin
  dependency-version: 5.6.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 12:53:11 +10:00
dependabot[bot] 24b9ff3b5f Bump dotenv from 17.2.1 to 17.2.2
Bumps [dotenv](https://github.com/motdotla/dotenv) from 17.2.1 to 17.2.2.
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](https://github.com/motdotla/dotenv/compare/v17.2.1...v17.2.2)

---
updated-dependencies:
- dependency-name: dotenv
  dependency-version: 17.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 12:49:46 +10:00
dependabot[bot] a38b8922a0 Bump @babel/preset-env from 7.28.0 to 7.28.3
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.28.0 to 7.28.3.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.28.3/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-version: 7.28.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 12:49:13 +10:00
dependabot[bot] fcedc00612 Bump react-router-dom from 7.7.1 to 7.8.2
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 7.7.1 to 7.8.2.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@7.8.2/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-version: 7.8.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 12:48:11 +10:00
Kayne Ruse da4316dccc Experimenting with dependabot 2025-09-09 18:48:01 +10:00
Kayne Ruse faacb8b8c7 Fixed CORS configuration 2025-07-29 14:40:24 +10:00
Kayne Ruse c48fcba994 Commented out MacOS check in configure-script.js 2025-07-29 12:49:50 +10:00
Kayne Ruse 56e3151db0 Fixed a missing import 2025-07-29 11:02:02 +10:00
Kayne Ruse 8aeaa46332 Updated dependencies, removed server demo 2025-07-26 04:03:32 +10:00
8 changed files with 3140 additions and 3005 deletions
+10
View File
@@ -0,0 +1,10 @@
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
+1
View File
@@ -44,6 +44,7 @@ To set up this template in development mode:
4. Run `cp .envdev .env` and enter your details into the `.env` file
5. Execute `npm run dev`
6. Navigate to `http://localhost:3001` in your web browser
7. Repeat this process for each microservice (linked above)
# Features List
-3
View File
@@ -1,6 +1,3 @@
//polyfills
import 'regenerator-runtime/runtime';
import React from 'react';
import ReactDOM from 'react-dom/client';
+15 -8
View File
@@ -46,18 +46,21 @@ See https://github.com/krgamestudios/MERN-template/wiki for help.
`
);
//determine local computer address for mac user vs everyone else
let macUser = '';
while (macUser.toLowerCase() !== 'yes' && macUser.toLowerCase() !== 'no') {
macUser = await question('Will the MERN-Template be running locally on a MacOS system? (yes or no, this only alters startup.sql)', '');
}
// //determine local computer address for mac user vs everyone else
// let macUser = '';
// while (macUser.toLowerCase() !== 'yes' && macUser.toLowerCase() !== 'no') {
// macUser = await question('Will the MERN-Template be running locally on a MacOS system? (yes or no, this only alters startup.sql)', '');
// }
const localAddress = macUser ? 'localhost' : '%';
// const localAddress = macUser === 'yes' ? 'localhost' : '%';
const localAddress = '%';
//project configuration
const projectName = await question('Project Name', 'template');
const projectWebAddress = await question('Project Web Address', 'example.com');
const corsWebOrigin = await question('CORS Web Origin', `https://${projectWebAddress}`);
let projectDBLocation = '';
while (typeof projectDBLocation != 'string' || /^[le]/i.test(projectDBLocation[0]) == false) {
projectDBLocation = await question('Project [l]ocal or [e]xternal database?');
@@ -180,7 +183,7 @@ See https://github.com/krgamestudios/MERN-template/wiki for help.
const defaultHost = tmpHost;
if (defaultUser) {
console.log(`Default user email will be: ${defaultUser}@${authWebAddress}`);
console.log(`Default user email will be: ${defaultUser}@${defaultHost}`);
}
//traefic configuration
@@ -206,6 +209,7 @@ services:
- traefik.http.routers.${projectName}router.service=${projectName}service@docker
- traefik.http.services.${projectName}service.loadbalancer.server.port=${projectPort}
environment:
- WEB_ORIGIN=${corsWebOrigin}
- WEB_PORT=${projectPort}
- DB_HOSTNAME=${projectDBHost}
- DB_PORTNAME=${projectDBPort}
@@ -238,6 +242,7 @@ services:
- traefik.http.routers.${newsName}router.service=${newsName}service@docker
- traefik.http.services.${newsName}service.loadbalancer.server.port=${newsPort}
environment:
- WEB_ORIGIN=${corsWebOrigin}
- WEB_PORT=${newsPort}
- DB_HOSTNAME=${newsDBHost}
- DB_PORTNAME=${newsDBPort}
@@ -268,6 +273,7 @@ services:
- traefik.http.routers.${authName}router.service=${authName}service@docker
- traefik.http.services.${authName}service.loadbalancer.server.port=${authPort}
environment:
- WEB_ORIGIN=${corsWebOrigin}
- WEB_PROTOCOL=https
- WEB_ADDRESS=${authWebAddress}
- HOOK_POST_VALIDATION_ARRAY=${authPostValidationHookArray}
@@ -309,6 +315,7 @@ services:
- traefik.http.routers.${chatName}router.service=${chatName}service@docker
- traefik.http.services.${chatName}service.loadbalancer.server.port=${chatPort}
environment:
- WEB_ORIGIN=${corsWebOrigin}
- WEB_PORT=${chatPort}
- DB_HOSTNAME=${chatDBHost}
- DB_PORTNAME=${chatDBPort}
@@ -376,7 +383,7 @@ networks:
FROM node:22-bookworm-slim
WORKDIR "/app"
COPY . /app
RUN mkdir /app/public
RUN mkdir -p /app/public
RUN chown node:node /app/public
RUN npm install --production
EXPOSE ${projectPort}
+3085 -2961
View File
File diff suppressed because it is too large Load Diff
+22 -25
View File
@@ -10,10 +10,7 @@
"build:client": "webpack --env=production --config webpack.config.js",
"dev": "concurrently npm:dev:server npm:dev:client",
"dev:server": "nodemon --ext js,jsx,json --ignore 'node_modules/*'",
"dev:client": "webpack serve --env=development --config webpack.config.js",
"local": "concurrently npm:local:server npm:local:client",
"local:server": "nodemon --ext js,jsx,json --ignore 'node_modules/*'",
"local:client": "webpack serve --env=local --config webpack.config.js",
"dev:client": "webpack serve --config webpack.config.js",
"analyze": "webpack --env=production --env=analyze --config webpack.config.js"
},
"repository": {
@@ -27,34 +24,34 @@
},
"homepage": "https://github.com/KRGameStudios/MERN-template#readme",
"dependencies": {
"@babel/core": "^7.24.5",
"@babel/preset-env": "^7.24.5",
"@babel/preset-react": "^7.24.1",
"babel-loader": "^9.1.3",
"@babel/core": "^7.28.4",
"@babel/preset-env": "^7.28.3",
"@babel/preset-react": "^7.27.1",
"babel-loader": "^10.0.0",
"clean-webpack-plugin": "^4.0.0",
"compression-webpack-plugin": "^11.1.0",
"concurrently": "^8.2.2",
"css-loader": "^7.1.1",
"concurrently": "^9.2.1",
"css-loader": "^7.1.2",
"dateformat": "^5.0.3",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"html-webpack-plugin": "^5.6.0",
"dotenv": "^17.2.2",
"express": "^5.1.0",
"html-webpack-plugin": "^5.6.4",
"jwt-decode": "^4.0.0",
"mariadb": "^3.3.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router": "^6.3.0",
"react-router-dom": "^6.23.0",
"react-select": "^5.8.0",
"sequelize": "^6.37.3",
"socket.io-client": "^4.7.5",
"mariadb": "^3.4.5",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"react-router": "^7.7.1",
"react-router-dom": "^7.8.2",
"react-select": "^5.10.2",
"sequelize": "^6.37.7",
"socket.io-client": "^4.8.1",
"style-loader": "^4.0.0",
"webpack": "^5.91.0",
"webpack": "^5.101.3",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4"
"webpack-cli": "^6.0.1"
},
"devDependencies": {
"nodemon": "^3.1.0",
"webpack-dev-server": "^5.0.4"
"nodemon": "^3.1.10",
"webpack-dev-server": "^5.2.2"
}
}
+3 -3
View File
@@ -13,14 +13,14 @@ const server = require('http').Server(app);
app.use(express.json());
//handle compressed files (middleware)
app.get('*.js', (req, res, next) => {
app.get('/{*any}.js', (req, res, next) => {
req.url = req.url + '.gz';
res.set('Content-Encoding', 'gzip');
res.set('Content-Type', 'text/javascript');
next();
});
app.get('*.css', (req, res, next) => {
app.get('/{*any}.css', (req, res, next) => {
req.url = req.url + '.gz';
res.set('Content-Encoding', 'gzip');
res.set('Content-Type', 'text/css');
@@ -34,7 +34,7 @@ const database = require('./database');
app.use('/', express.static(path.resolve(__dirname, '..', 'public')));
//fallback to the index file
app.get('*', (req, res) => {
app.get('/{*any}', (req, res) => {
res.sendFile(path.resolve(__dirname, '..', 'public' , 'index.html'));
});
+4 -5
View File
@@ -9,7 +9,7 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const path = require('path');
//the exported config function
module.exports = ({ production, development, local, analyze }) => {
module.exports = ({ production, analyze }) => {
return {
mode: production ? "production" : "development",
entry: path.resolve(__dirname, 'client', 'client.jsx'),
@@ -33,7 +33,6 @@ module.exports = ({ production, development, local, analyze }) => {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: ['@babel/plugin-syntax-dynamic-import']
}
}
]
@@ -48,9 +47,9 @@ module.exports = ({ production, development, local, analyze }) => {
new DefinePlugin({
'process.env': {
'PRODUCTION': production,
'NEWS_URI': production ? `"${process.env.NEWS_URI}"` : development ? '"https://dev-news.krgamestudios.com"' : '"http://localhost:3100"',
'AUTH_URI': production ? `"${process.env.AUTH_URI}"` : development ? '"https://dev-auth.krgamestudios.com"' : '"http://localhost:3200"',
'CHAT_URI': production ? `"${process.env.CHAT_URI}"` : development ? '"https://dev-chat.krgamestudios.com"' : '"http://localhost:3300"',
'NEWS_URI': production ? `"${process.env.NEWS_URI}"` : '"http://localhost:3100"',
'AUTH_URI': production ? `"${process.env.AUTH_URI}"` : '"http://localhost:3200"',
'CHAT_URI': production ? `"${process.env.CHAT_URI}"` : '"http://localhost:3300"',
}
}),
new CleanWebpackPlugin({