GeriLife / wellbeing-client

Client-only code for Wellbeing project.
Apache License 2.0
0 stars 0 forks source link

34 Adding env variable for API calls. Removing api proxy prefix #38

Closed shailee-m closed 3 years ago

shailee-m commented 3 years ago

closes #34 , #35

shailee-m commented 3 years ago

@brylie In deployment, the API calls are going to http://95.217.223.95/api/methods/checkIfLoggedIn? which is still not the meteor server. Also, tested it locally. The proxy won't work for service files. Also, the process.env variables defined requires dotenv to be read into the server. So I have added it back and with this one env file it would work in production as well.. no proxies required

brylie commented 3 years ago

@shailee-m the deployment is configured to proxy requests to /api/ to the Meteor deployment:

https://github.com/GeriLife/wellbeing-client/blob/fd1c5826eeec91270c2cf892cd37f9608514c00f/static.json#L12-L15

Likewise, the development environment is configured to proxy local requests starting with /api/ to the Meteor server running on port 3000:

https://github.com/GeriLife/wellbeing-client/pull/36/files

Please test and review pull request #36 before proceeding to troubleshoot the static build.

brylie commented 3 years ago

In deployment, the API calls are going to http://95.217.223.95/api/methods/checkIfLoggedIn? which is still not the meteor server.

Try using a REST client like Postwoman to make a POST request to http://95.217.223.95/api/methods/checkIfLoggedIn

shailee-m commented 3 years ago

@brylie Can I get a valid login cred to check if the reloading issue is happening for other forms as well?