Skip to content
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

[TASK] Differentiate api endpoints on frontend between dev and prod #111

Open
1 task done
waveyboym opened this issue Jun 30, 2024 · 3 comments
Open
1 task done
Assignees
Labels
effort: 5 This may require/required hours of work For: api This is mainly for the api For: frontend This is mainly related to frontend UI code good first issue Good for newcomers platform: mobile This is related to mobile platforms platform: web/desktop This is related to web/desktop platforms priority: critical This needs/needed to be addressed immediately priority: high This needs/needed to be addressed as soon as possible type: task Task request

Comments

@waveyboym
Copy link
Member

waveyboym commented Jun 30, 2024

Task Request
It has been noted that when endpoints are called, hard coded string values are used for the main domain. We have dev.occupi.tech(which contains unstable endpoints that are mainly alpha) and occupi.tech. Your task is to:

  • Use an environment variable or something of the sort that will automatically determine if you are in dev(dev.occupi.tech) or prod(occupi.tech) and use the appropriate urls so that code in prod never accesses the dev backend.

@u21631532 and @Tinashe-Austin, please tick off as you complete each task by clicking on the task you are done with in this comment

Additional info
@Tinashe-Austin , please refer to this article as a starting point to familiarize yourself with the content: https://vitejs.dev/guide/env-and-mode
@u21631532, @KamogeloMoeketse , please refer to this article as a starting point to familiarize yourself with the content: https://docs.expo.dev/guides/environment-variables/

@waveyboym waveyboym added good first issue Good for newcomers For: frontend This is mainly related to frontend UI code For: api This is mainly for the api priority: critical This needs/needed to be addressed immediately priority: high This needs/needed to be addressed as soon as possible effort: 5 This may require/required hours of work type: task Task request platform: mobile This is related to mobile platforms platform: web/desktop This is related to web/desktop platforms labels Jun 30, 2024
@waveyboym waveyboym added this to the Stability Run milestone Jun 30, 2024
@u21631532
Copy link
Contributor

does this issue need to be closed, i believe mobile has completed this, not too sure about web
@waveyboym and @Tinashe-Austin

@waveyboym
Copy link
Member Author

okay @u21631532 , @Tinashe-Austin have you differentiated domains when the app runs in dev and prod environments to use dev.occupi.tech for dev and occupi.tech for prod

@waveyboym
Copy link
Member Author

@Tinashe-Austin please may you offer a response as to whether or not you resolved this issue so we can close it. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: 5 This may require/required hours of work For: api This is mainly for the api For: frontend This is mainly related to frontend UI code good first issue Good for newcomers platform: mobile This is related to mobile platforms platform: web/desktop This is related to web/desktop platforms priority: critical This needs/needed to be addressed immediately priority: high This needs/needed to be addressed as soon as possible type: task Task request
Projects
None yet
Development

No branches or pull requests

4 participants