diff --git a/webiu-ui/src/app/page/contributors/contributors.component.ts b/webiu-ui/src/app/page/contributors/contributors.component.ts index 9da104ca..8db2821d 100644 --- a/webiu-ui/src/app/page/contributors/contributors.component.ts +++ b/webiu-ui/src/app/page/contributors/contributors.component.ts @@ -6,6 +6,7 @@ import { CommonModule } from '@angular/common'; import { ProfileCardComponent } from '../../components/profile-card/profile-card.component'; import { HttpClientModule, HttpClient } from '@angular/common/http'; import { CommmonUtilService } from '../../common/service/commmon-util.service'; +import { environment } from '../../../environments/environment'; @Component({ selector: 'app-contributors', standalone: true, @@ -42,7 +43,7 @@ export class ContributorsComponent implements OnInit { getProfiles() { this.http - .get('http://localhost:5000/api/contributor/contributors') + .get(`${environment.serverUrl}/api/contributor/contributors`) .subscribe({ next: (res) => { if (res) { diff --git a/webiu-ui/src/app/page/projects/projects.component.ts b/webiu-ui/src/app/page/projects/projects.component.ts index 0db2c6a0..ea9a1d68 100644 --- a/webiu-ui/src/app/page/projects/projects.component.ts +++ b/webiu-ui/src/app/page/projects/projects.component.ts @@ -5,7 +5,7 @@ import { NavbarComponent } from '../../components/navbar/navbar.component'; import { ProjectsCardComponent } from '../../components/projects-card/projects-card.component'; import { projectsData } from './projects-data'; import { Project, ProjectResponse } from './project.model'; - +import { environment } from '../../../environments/environment'; @Component({ selector: 'app-projects', standalone: true, @@ -30,7 +30,7 @@ export class ProjectsComponent implements OnInit { fetchProjects(): void { this.http - .get('http://localhost:5000/api/v1/project/projects/') + .get(`${environment.serverUrl}api/v1/project/projects/`) .subscribe({ next: (response) => { this.projectsData = response.repositories; diff --git a/webiu-ui/src/environments/environment.ts b/webiu-ui/src/environments/environment.ts new file mode 100644 index 00000000..df835856 --- /dev/null +++ b/webiu-ui/src/environments/environment.ts @@ -0,0 +1 @@ +export const environment = { production: false, serverUrl: 'http://localhost:5000' };