This commit is contained in:
Manav Rathi
2024-06-06 12:26:42 +05:30
parent 71e908c3a2
commit c51edddb53
4 changed files with 13 additions and 14 deletions

View File

@@ -20,7 +20,7 @@ Add the following to `web/apps/photos/.env.local`:
```env
NEXT_PUBLIC_ENTE_ENDPOINT = http://localhost:8080
NEXT_PUBLIC_ENTE_PAYMENTS_ENDPOINT = http://localhost:3001
NEXT_PUBLIC_ENTE_PAYMENTS_URL = http://localhost:3001
```
Then start it locally

View File

@@ -41,13 +41,13 @@
#
# NEXT_PUBLIC_ENTE_ENDPOINT = http://localhost:3000
# The Ente API endpoint for accounts related functionality
# The URL of the accounts app
#
# NEXT_PUBLIC_ENTE_ACCOUNTS_ENDPOINT = http://localhost:3001
# NEXT_PUBLIC_ENTE_ACCOUNTS_URL = http://localhost:3001
# The Ente API endpoint for payments related functionality
# The URL of the payments app
#
# NEXT_PUBLIC_ENTE_PAYMENTS_ENDPOINT = http://localhost:3001
# NEXT_PUBLIC_ENTE_PAYMENTS_URL = http://localhost:3001
# The URL for the shared albums deployment
#
@@ -69,7 +69,7 @@
#
# NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT = http://localhost:3002
# The URL of the family plans web app deployment
# The URL of the family plans web app
#
# Currently the source code for the family plan related pages is in a separate
# repository (https://github.com/ente-io/families). The mobile app also uses
@@ -77,7 +77,7 @@
#
# Enhancement: Consider moving that into the app/ folder in this repository.
#
# NEXT_PUBLIC_ENTE_FAMILY_ENDPOINT = http://localhost:3001
# NEXT_PUBLIC_ENTE_FAMILY_URL = http://localhost:3001
# The JSON which describes the expected results of our integration tests. See
# `upload.test.ts` for more details of the expected format.

View File

@@ -27,5 +27,5 @@
# in the app you're running (e.g. in apps/accounts), and put an
# `NEXT_PUBLIC_ENTE_ENDPOINT` in there.
#NEXT_PUBLIC_ENTE_ACCOUNTS_ENDPOINT = http://localhost:3001
#NEXT_PUBLIC_ENTE_PAYMENTS_ENDPOINT = http://localhost:3001
#NEXT_PUBLIC_ENTE_ACCOUNTS_URL = http://localhost:3001
#NEXT_PUBLIC_ENTE_PAYMENTS_URL = http://localhost:3001

View File

@@ -38,12 +38,11 @@ export const getUploadEndpoint = () => {
* Return the URL of the Ente Accounts app.
*
* Defaults to our production instance, "https://accounts.ente.io", but can be
* overridden by setting the `NEXT_PUBLIC_ENTE_ACCOUNTS_ENDPOINT` environment
* overridden by setting the `NEXT_PUBLIC_ENTE_ACCOUNTS_URL` environment
* variable to a non-empty value.
*/
export const accountsAppURL = () =>
process.env.NEXT_PUBLIC_ENTE_ACCOUNTS_ENDPOINT ||
`https://accounts.ente.io`;
process.env.NEXT_PUBLIC_ENTE_ACCOUNTS_URL || `https://accounts.ente.io`;
export const getAlbumsURL = () => {
const albumsURL = process.env.NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT;
@@ -58,7 +57,7 @@ export const getAlbumsURL = () => {
* family plans.
*/
export const getFamilyPortalURL = () => {
const familyURL = process.env.NEXT_PUBLIC_ENTE_FAMILY_ENDPOINT;
const familyURL = process.env.NEXT_PUBLIC_ENTE_FAMILY_URL;
if (familyURL) {
return familyURL;
}
@@ -69,7 +68,7 @@ export const getFamilyPortalURL = () => {
* Return the URL for the host that handles payment related functionality.
*/
export const getPaymentsURL = () => {
const paymentsURL = process.env.NEXT_PUBLIC_ENTE_PAYMENTS_ENDPOINT;
const paymentsURL = process.env.NEXT_PUBLIC_ENTE_PAYMENTS_URL;
if (paymentsURL) {
return paymentsURL;
}