frontend add

This commit is contained in:
shinmj
2021-10-21 09:03:17 +09:00
parent 8caa4bbc5a
commit cb9d50511e
443 changed files with 88282 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
const { i18n } = require('./next-i18next.config')
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
const port = process.env.PORT || 3000
const serverApiUrl = process.env.SERVER_API_URL || 'http://localhost:8000'
const siteId = process.env.SITE_ID || '3'
const mode = siteId === '2' ? 'lg' : siteId === '3' ? 'sm' : 'sm'
module.exports = {
i18n,
env: {
PORT: port,
PROXY_HOST: process.env.PROXY_HOST || `http://localhost:${port}`,
MODE: mode,
SERVER_API_URL: serverApiUrl,
SITE_ID: siteId,
},
async rewrites() {
return [
{
source: '/server/:path*',
destination: `${serverApiUrl}/:path*`,
},
]
},
}