From 12a482324c699d4b8a96b5af1a389c25e2a59fb9 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 19 Mar 2022 03:11:52 +0300 Subject: [PATCH] pm2 file and redirect fix --- app/ecosystem.config.js | 7 +++++++ app/next.config.js | 30 ++++++++++++++++++++++-------- app/package-lock.json | 11 +++++++++++ app/package.json | 1 + 4 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 app/ecosystem.config.js diff --git a/app/ecosystem.config.js b/app/ecosystem.config.js new file mode 100644 index 0000000..04bd8c7 --- /dev/null +++ b/app/ecosystem.config.js @@ -0,0 +1,7 @@ +module.exports = { + apps: [{ + name: 'warframe-center-app', + script: 'npm run start', + watch: false + }] +} diff --git a/app/next.config.js b/app/next.config.js index 5aed7b3..f2ff8c0 100644 --- a/app/next.config.js +++ b/app/next.config.js @@ -1,16 +1,30 @@ +const withPlugins = require('next-compose-plugins') + /** @type {import('next').NextConfig} */ const nextConfig = { - reactStrictMode: true, - redirects: [ - { - source: '/', - destination: '/home', - permanent: true - } - ] + reactStrictMode: true // webpack: (config, { webpack }) => { // return config // }, } +const redirects = { + async redirects () { + return [ + { + source: '/', + destination: '/home', + permanent: true + } + ] + } +} + +module.exports = withPlugins( + [ + [redirects] + ], + nextConfig +) + module.exports = nextConfig diff --git a/app/package-lock.json b/app/package-lock.json index 0a93dc5..3d3ad9a 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -11,6 +11,7 @@ "@mui/material": "^5.5.0", "@mui/x-data-grid": "^5.6.1", "next": "latest", + "next-compose-plugins": "^2.2.1", "react": "^17.0.2", "react-dom": "^17.0.2", "react-moment": "^1.1.1", @@ -3485,6 +3486,11 @@ } } }, + "node_modules/next-compose-plugins": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/next-compose-plugins/-/next-compose-plugins-2.2.1.tgz", + "integrity": "sha512-OjJ+fV15FXO2uQXQagLD4C0abYErBjyjE0I0FHpOEIB8upw0hg1ldFP6cqHTJBH1cZqy96OeR3u1dJ+Ez2D4Bg==" + }, "node_modules/node-abi": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.8.0.tgz", @@ -6986,6 +6992,11 @@ "use-subscription": "1.5.1" } }, + "next-compose-plugins": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/next-compose-plugins/-/next-compose-plugins-2.2.1.tgz", + "integrity": "sha512-OjJ+fV15FXO2uQXQagLD4C0abYErBjyjE0I0FHpOEIB8upw0hg1ldFP6cqHTJBH1cZqy96OeR3u1dJ+Ez2D4Bg==" + }, "node-abi": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.8.0.tgz", diff --git a/app/package.json b/app/package.json index 3c8990c..9b92287 100644 --- a/app/package.json +++ b/app/package.json @@ -12,6 +12,7 @@ "@mui/material": "^5.5.0", "@mui/x-data-grid": "^5.6.1", "next": "latest", + "next-compose-plugins": "^2.2.1", "react": "^17.0.2", "react-dom": "^17.0.2", "react-moment": "^1.1.1",