Compare commits

...

9 Commits

Author SHA1 Message Date
Kayne Ruse d37b93d5f7 Updated webpack-dev-server to 4.6.0 2021-12-20 07:07:36 +00:00
Kayne Ruse 829cb2e3da Disabled source map in prod 2021-12-20 06:19:23 +00:00
Kayne Ruse 29f0dbb1ca Fixed HTTPS redirection 2021-12-15 18:39:37 +00:00
Kayne Ruse 13ad7d2435 Updated README.md 2021-12-11 16:57:48 +00:00
Kayne Ruse e30853e0cd Updated configure-script.js 2021-12-11 11:38:17 +00:00
Kayne Ruse 1e16a96f86 Updated README.md 2021-12-11 05:01:10 +00:00
Kayne Ruse cff73107b2 Updated package-lock.json 2021-11-17 06:13:41 +00:00
Kayne Ruse 76417747b3 Bumped node to version 16 LTS 2021-11-17 04:58:08 +00:00
Kayne Ruse b8323723ed Updated package-lock.json 2021-11-15 22:37:51 +00:00
5 changed files with 1065 additions and 4633 deletions
+1
View File
@@ -56,6 +56,7 @@ To set up this template in development mode:
- Account deletion
- Password management
- JSON web token authentication
- Optional post validation hook
- Fully Featured News Blog (as a microservice)
- Publish, edit or delete articles as needed
- Secured via admin panel
+7 -2
View File
@@ -62,6 +62,7 @@ See https://github.com/krgamestudios/MERN-template/wiki for help.
//auth configuration
const authName = await question('Auth Name', 'auth');
const authWebAddress = await question('Auth Web Address', `${authName}.${projectWebAddress}`);
const authPostValidationHook = await question('Auth Post Validation Hook', '');
const authResetAddress = await question('Auth Reset Addr', `${projectWebAddress}/reset`);
const authDBUser = await question('Auth DB Username', authName);
const authDBPass = await question('Auth DB Password', 'charizard');
@@ -180,6 +181,7 @@ services:
environment:
- WEB_PROTOCOL=https
- WEB_ADDRESS=${authWebAddress}
- HOOK_POST_VALIDATION=${authPostValidationHook}
- WEB_RESET_ADDRESS=${authResetAddress}
- WEB_PORT=${authPort}
- DB_HOSTNAME=database
@@ -245,11 +247,14 @@ services:
- --api.insecure=false
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
- --entrypoints.web.http.redirections.entryPoint.to=websecure
- --entrypoints.web.http.redirections.entryPoint.scheme=https
- --entrypoints.web.http.redirections.entrypoint.permanent=true
- --entrypoints.websecure.address=:443
- --certificatesresolvers.myresolver.acme.tlschallenge=true
- --certificatesresolvers.myresolver.acme.email=${supportEmail}
- --certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json
- traefik.docker.network=app-network
ports:
- 80:80
- 443:443
@@ -265,7 +270,7 @@ networks:
`;
const dockerfile = `
FROM node:15
FROM node:16
WORKDIR "/app"
COPY . /app
RUN mkdir /app/public
+1044 -4594
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "mern-template",
"version": "1.0.5",
"version": "1.1.0",
"description": "A website template using the MERN stack.",
"main": "server/server.js",
"scripts": {
@@ -57,6 +57,6 @@
},
"devDependencies": {
"nodemon": "^2.0.12",
"webpack-dev-server": "^3.11.2"
"webpack-dev-server": "^4.6.0"
}
}
+11 -35
View File
@@ -19,7 +19,7 @@ module.exports = ({ production, analyze }) => {
filename: '[name].[chunkhash].js',
sourceMapFilename: '[name].[chunkhash].js.map'
},
devtool: production ? 'source-map' : 'eval-source-map',
devtool: production ? false : 'eval-source-map',
resolve: {
extensions: ['.js', '.jsx']
},
@@ -83,41 +83,17 @@ module.exports = ({ production, analyze }) => {
})
],
devServer: {
contentBase: path.resolve(__dirname, 'public'),
compress: true,
port: 3001,
proxy: {
'/api/': 'http://localhost:3000/'
},
overlay: {
errors: true
},
stats: {
colors: true,
hash: false,
version: false,
timings: false,
assets: false,
chunks: false,
modules: false,
reasons: false,
children: false,
source: false,
errors: true,
errorDetails: false,
warnings: true,
publicPath: false
},
host: '0.0.0.0',
disableHostCheck: true,
clientLogLevel: 'silent',
historyApiFallback: true,
hot: true,
injectHot: true
},
watchOptions: {
ignored: /(node_modules)/
host: 'localhost',
port: 3001,
client: {
overlay: {
errors: true,
warnings: true,
},
},
static: '/public'
}
}
};