1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 19:34:34 +00:00

fix(docker): docker-compose for prod+development

This commit is contained in:
Saad Jutt
2021-11-15 00:52:29 +05:00
parent 5e7cecf3ea
commit 4a363c5b97
12 changed files with 93 additions and 9 deletions

View File

@@ -7,8 +7,12 @@ const headers = {
Accept: 'application/json',
'Content-Type': 'application/json'
}
const { NODE_ENV, REACT_APP_PORT_API } = process.env
const baseUrl =
process.env.NODE_ENV === 'development' ? 'http://localhost:5000' : undefined
NODE_ENV === 'development'
? `http://localhost:${REACT_APP_PORT_API ?? 5000}`
: ''
const getAuthCode = async (credentials: any) => {
return fetch(`${baseUrl}/SASjsApi/auth/authorize`, {
method: 'POST',