Skip to content

Commit 480b22b

Browse files
author
Florin Mateescu
committed
- Fix the environment variables
- add web-url constant to shared-constants
1 parent 83afd4a commit 480b22b

23 files changed

+15
-94
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@ mongodata
4444
.mongodata
4545
.vscode
4646
.env.local
47-
.env
47+
.env
48+
libs/shared-constants/src/lib/web-url.ts

apps/express/src/payloadcms/components/RedirectComponent.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
import {
2-
AuthPaths,
3-
sharedEnvironment,
4-
} from '@binarystarter-angular/shared-constants';
1+
import { AuthPaths, webUrl } from '@binarystarter-angular/shared-constants';
52
import React from 'react';
63

7-
const url = sharedEnvironment.web.url;
4+
const url = webUrl;
85

96
export const RedirectToFrontendLogoutButton = () => {
107
const redirectToWeb = () => {

apps/express/src/payloadcms/components/ReturnToWebComponent.tsx

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
import {
2-
AuthPaths,
3-
sharedEnvironment,
4-
} from '@binarystarter-angular/shared-constants';
1+
import { AuthPaths, webUrl } from '@binarystarter-angular/shared-constants';
52
import React from 'react';
63

7-
const webUrl = sharedEnvironment.web.url;
8-
94
export const ReturnToWebComponent = () => {
105
const redirectToWeb = () => {
116
window.location.href = `${webUrl}${AuthPaths.login}`;

apps/web/src/assets/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Copy paste the content from the theme assets. Optionally delete the unused ones.
2+
3+
e.g. cp libs/default-theme/src/assets/* apps/web/src/assets

apps/web/src/assets/demo/angular.png

-1.23 KB
Loading
File renamed without changes.
19.6 KB
Loading
29.5 KB
Loading
11.4 KB
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add here the static images of the app.
3.17 KB
Loading
Loading
Loading
Loading
Loading

libs/default-theme/src/lib/environments/environment.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
33
// The list of file replacements can be found in `angular.json`.
44

5-
import { sharedEnvironment } from '@binarystarter-angular/shared-constants';
6-
7-
export const environment = sharedEnvironment;
5+
export const environment = {
6+
production: true,
7+
};
88

99
/*
1010
* For easier debugging in development mode, you can import the following file

libs/shared-constants/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from './lib/auth.paths';
22
export * from './lib/spa.paths';
3-
export * from './lib/environment';
3+
export * from './lib/web-url';

libs/shared-constants/src/lib/environment.ts

-24
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const webUrl = '';

libs/shared-constants/tsconfig.lib.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"types": ["node"]
88
},
99
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
10-
"include": ["src/**/*.ts"]
10+
"include": ["src/**/*.ts", "src/lib/web-url.ts.example"]
1111
}

libs/shared-types/src/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ export * from './lib/IResponse';
22
export * from './lib/PayloadCreateDoc';
33
export * from './lib/PayloadPaginatedDocs';
44
export * from './lib/IUser';
5-
export * from './lib/EnvironmentType';

libs/shared-types/src/lib/EnvironmentType.ts

-52
This file was deleted.

0 commit comments

Comments
 (0)