mirror of
https://github.com/sasjs/server.git
synced 2026-01-06 06:10:04 +00:00
fix(docker): docker-compose for prod+development
This commit is contained in:
@@ -13,10 +13,12 @@ dotenv.config()
|
||||
|
||||
const app = express()
|
||||
|
||||
const { MODE, CORS } = process.env
|
||||
const { MODE, CORS, PORT_WEB } = process.env
|
||||
if (MODE?.trim() !== 'server' || CORS?.trim() === 'enable') {
|
||||
console.log('All CORS Requests are enabled')
|
||||
app.use(cors({ credentials: true, origin: 'http://localhost:3000' }))
|
||||
app.use(
|
||||
cors({ credentials: true, origin: `http://localhost:${PORT_WEB ?? 3000}` })
|
||||
)
|
||||
}
|
||||
|
||||
app.use(express.json({ limit: '50mb' }))
|
||||
|
||||
Reference in New Issue
Block a user