Skip to content

Commit 4786a95

Browse files
committed
2 parents 3772ab7 + cb7e505 commit 4786a95

File tree

9 files changed

+32
-6
lines changed

9 files changed

+32
-6
lines changed

config/local-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "IP_SERVER": "http://localhost:8888/api" }

config/server-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "IP_SERVER": "http://72.60.41.133:8888/api" }

docker-compose.prod-frontend.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ services:
55
container_name: codecampus-frontend
66
image: ${DOCKERHUB_USER}/codecampus-frontend:${IMAGE_TAG:-latest}
77
restart: unless-stopped
8-
ports: [ "4200:4200" ]
9-
networks: [ backend ]
8+
ports: ["4200:80"]
9+
networks: [backend]
1010

1111
networks:
1212
backend:

package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proxy.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"/api": {
3-
"target": "https://192.168.1.220:8888",
3+
"target": "https://localhost:8888",
44
"secure": false,
55
"changeOrigin": true,
66
"logLevel": "debug"

public/assets/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"IP_SERVER": "http://localhost:8888/api"
3+
}

public/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "apiUrl": "http://localhost:8888/api" }
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
export const environment = {
22
production: true,
33
IP_SERVER: 'http://72.60.41.133:8888/api',
4-
IP_SERVER_NO_SSL: 'http://192.168.1.220:8000/api',
5-
IP_SERVER_RADMIN: 'http://26.100.147.137:8888/api',
6-
IP_LOCAL: 'http://localhost:8081/api',
74
};

src/main.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,13 @@ import { bootstrapApplication } from '@angular/platform-browser';
22
import { appConfig } from './app/app.config';
33
import { App } from './app/app';
44

5+
// // Load runtime config trước khi bootstrap
6+
// fetch('/assets/config.json')
7+
// .then((response) => response.json())
8+
// .then((config) => {
9+
// (window as any).env = config;
10+
// return bootstrapApplication(App, appConfig);
11+
// })
12+
// .catch((err) => console.error(err));
13+
514
bootstrapApplication(App, appConfig).catch((err) => console.error(err));

0 commit comments

Comments
 (0)