-
Notifications
You must be signed in to change notification settings - Fork 0
chore : signup and login intergrations with backend #38
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,3 @@ | ||
| /** | ||
| * App Configuration | ||
| * ----------------- | ||
| * This file contains all development-level app configurations. | ||
| * Not to be confused with user-configurable app settings like theme preferences. | ||
| * | ||
| * Note: | ||
| * To connect to a local backend instead of production: Set isProduction to false | ||
| */ | ||
|
|
||
| const isProduction = false; | ||
|
|
||
| const DOMAINS = { | ||
|
|
@@ -16,26 +6,31 @@ const DOMAINS = { | |
| }; | ||
|
|
||
| const PORTS = { | ||
| production: 8000, | ||
| production: 8081, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this needs to be 8000 |
||
| local: 8000 | ||
| }; | ||
|
|
||
| const BACKEND_DOMAIN = isProduction ? DOMAINS.production : DOMAINS.local; | ||
| const BACKEND_PORT = isProduction ? PORTS.production : PORTS.local; | ||
| const BACKEND_URL = `${BACKEND_DOMAIN}:${BACKEND_PORT}`; | ||
|
|
||
| interface Setting { | ||
| isUserVisible: boolean; | ||
| value: string | number | object; | ||
| } | ||
| const BACKEND_URL = `http://${BACKEND_DOMAIN}:${BACKEND_PORT}`; | ||
|
|
||
| interface Settings { | ||
| [key: string]: Setting; | ||
| } | ||
|
|
||
| export const settings: Settings = { | ||
| export const settings = { | ||
| rebotWebsocket: { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. interfaces should not be removed, since this is typescript file |
||
| isUserVisible: false, | ||
| value: `ws://${BACKEND_URL}/ws/rebot` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. line 15 change affects line 20. So change it to ws://${BACKEND_DOMAIN}:${BACKEND_PORT}/ws/rebot |
||
| }, | ||
| }; | ||
| apiBaseUrl: { | ||
| isUserVisible: false, | ||
| value: BACKEND_URL | ||
| }, | ||
| authEndpoints: { | ||
| isUserVisible: false, | ||
| value: { | ||
| login: "/login", | ||
| signupStepOne: "/signup/step-one", | ||
| signupStepTwo: "/signup/step-two", | ||
| forgotPassword: "/forget-password/", | ||
| resetPassword: "/reset-password" | ||
|
Comment on lines
+29
to
+33
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need to be prefixed with the port and backend url. Like |
||
| } | ||
| } | ||
| }; | ||
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.
no need to remove this