diff --git a/tools/app/angular-tour-of-heroes/package.json b/tools/app/angular-tour-of-heroes/package.json index f38dead..ff303b2 100644 --- a/tools/app/angular-tour-of-heroes/package.json +++ b/tools/app/angular-tour-of-heroes/package.json @@ -5,6 +5,7 @@ "ng": "ng", "start": "ng serve", "build": "ng build", + "build-prod": "ng build --prod", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" diff --git a/tools/app/angular-tour-of-heroes/src/app/hero.service.ts b/tools/app/angular-tour-of-heroes/src/app/hero.service.ts index 53eb6e4..3430602 100644 --- a/tools/app/angular-tour-of-heroes/src/app/hero.service.ts +++ b/tools/app/angular-tour-of-heroes/src/app/hero.service.ts @@ -13,16 +13,16 @@ export class HeroService { getHeroes(): Promise { this.messageService.add('HeroService: fetched heroes'); - return this.http.get(`http://172.16.3.185:5000/heroes`).toPromise() + return this.http.get(`http://172.16.3.185:5000/heroes/heroes`).toPromise() } getHero(id: number): Promise { this.messageService.add(`HeroService: fetch hero id=${id}`); - return this.http.get(`http://172.16.3.185:5000/hero/${id}`).toPromise() + return this.http.get(`http://172.16.3.185:5000/heroes/hero/${id}`).toPromise() } updateHero(hero: Hero): Promise { this.messageService.add(`HeroService: save change: id=${hero.id}, name=${hero.name}`); - return this.http.put(`http://172.16.3.185:5000/hero/${hero.id}`, hero).toPromise() + return this.http.put(`http://172.16.3.185:5000/heroes/hero/${hero.id}`, hero).toPromise() } }