Updated dependencies, removed server demo
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
//polyfills
|
||||
import 'regenerator-runtime/runtime';
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
|
||||
import App from './pages/app';
|
||||
|
||||
Generated
+2973
-2928
File diff suppressed because it is too large
Load Diff
+22
-25
@@ -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.0",
|
||||
"@babel/preset-env": "^7.28.0",
|
||||
"@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.0",
|
||||
"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.1",
|
||||
"express": "^5.1.0",
|
||||
"html-webpack-plugin": "^5.6.3",
|
||||
"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.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-router": "^7.7.1",
|
||||
"react-router-dom": "^7.7.1",
|
||||
"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.100.2",
|
||||
"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
@@ -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
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user