We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 814a860 commit 0e98585Copy full SHA for 0e98585
src/config/baseClient.ts
src/config/baseURL.ts
@@ -0,0 +1,20 @@
1
+const URL_CLIENT = {
2
+ development: 'http://localhost:3000',
3
+ staging: 'https://staging.example.com',
4
+ production: 'https://example.com',
5
+}
6
+
7
+const URL_SERVER = {
8
+ development: `http://localhost:${process.env.PORT || 8000}`,
9
+ staging: 'https://api-staging.example.com',
10
+ production: 'https://api.example.com',
11
12
13
+const ENV = process.env.NODE_ENV || 'development'
14
15
+// @ts-ignore
16
+const BASE_URL_CLIENT = URL_CLIENT[ENV]
17
18
+const BASE_URL_SERVER = URL_SERVER[ENV]
19
20
+export { BASE_URL_CLIENT, BASE_URL_SERVER }
0 commit comments