-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev: Add BIT backend heroku url #267
base: develop
Are you sure you want to change the base?
Conversation
@Rahulm2310 , I'm not sure why test is failing. Can you please give me a hint here? Thanks beforehand. |
@@ -36,6 +36,7 @@ export default function Register() { | |||
headers: { | |||
"Accept": "application/json", | |||
"Content-Type": "application/json", | |||
"Access-Control-Allow-Origin": {CORS_ORIGIN} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the browser not automatically add these? I have no clue about front end I always thought the browser would auto generate these in a "pre-flight" request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@epicadk , yeah, unfortunately it did not. Before I added this, the api calls received error stating No Access-Control-Allow-Origin header is present...
and it was cleared after I added this.
@isabelcosta , now that we have 2 approvals, should I refactor CORS origin in |
@mtreacy002 yes you can refactor :) This seems to make sense ;) I trust your decision here, just let me know when I should take a look again and help with review. |
add heroku specific branch on fork repo Refactor homepage url to fork repo for test remove extra backslash add CORS ORIGIN for remote BIT web on Login Add CORS ORIGIN headers on other existing features refactor to staging remote urls remove travis yml refactor config to include both upstream and fork BIT web url revert dotenv since gh action use different method for secret refactor config update config refactor to upstream BIT web org
dcbc0c9
to
df06420
Compare
Done, @isabelcosta . I've refactored it to the actual BIT web on anitab-org.github.io. Hopefully this will work so that BIT finally can have the remote application 🙏. |
@mtreacy002 the tests are failing. do you know why? Can you fix it before we merge? |
will try look into this, @isabelcosta . Hope @Rahulm2310 and @jalajcodes can also help me point out the possible cause here 🙏 |
@isabelcosta , @Rahulm2310 and @jalajcodes . I noticed that when I changed the BASE_API to localhost:5000 and CORS_ORIGIN to localhost:3000, the tests passed, but then when I switched it back to the remote urls (BASE_API https://bridge-in-tech-backend.herokuapp.com/ and CORS_ORIGIN https://anitab-org.github.io), the tests failed. I'm not sure why it's reacting like that. Can you please give me suggestions on how to fix this? PS: we need the default url to be set to the remote urls for the deployed BIT web to work remotely.
|
@mtreacy002 I am not sure why its passing with localhost as origin. But from what I can see in this file, we are searching for |
@jalajcodes , thank you for your tips. However, I'm still confused. The doc you referred to above stated that if we're using jest as testing framework (which we are), the cleanup should be automatically done. Although, I tried to use the afterEach(cleanup) anyway but for some reasons the tests still failed (2 out of 5 though, maybe I use the afterEach(cleanup) wrong, hehe). Can you please tell me where I did wrong? Thanks. I added Here's the gist with the error log But, adding that line (afterEach(cleanup)) didn't affect the tests if the urls are changed to local (tests still passed), just as before. |
@mtreacy002 I'll take a look at it later today |
@mtreacy002 Sorry for replying late, actually the problem is with the version of |
Thanks for the tips, @jalajcodes . I'll give it a try and update you on this 😉 |
Description
This PR supports partial integration of BIT and MS backend on Heroku remote servers by deploying BIT frontend that uses BIT and MS backend heroku servers as REST endpoints.
Fixes #266
Type of Change:
Code/Quality Assurance Only
How Has This Been Tested?
Tested on Maya Treacy's BIT web deployed on fork repo github.io by creating a new user and login after verifying email.
BIT frontend : https://mtreacy002.github.io/bridge-in-tech-web/
BIT backend: https://bridge-in-tech-backend.herokuapp.com/
MS backend: https://ms-backend-bit.herokuapp.com/
Checklist:
Code/Quality Assurance Only
Additional Notes