Skip to content

Commit 643d1e9

Browse files
committed
chore(server): moved server folder inside src
1 parent 09a85e1 commit 643d1e9

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"angular-cli": {},
66
"scripts": {
77
"start": "npm run server | npm run ng",
8-
"server": "json-server --port 3000 --watch server/db.json --routes server/routes.json",
8+
"server": "json-server --port 3000 --watch src/server/db.json --routes src/server/routes.json",
99
"ng": "ng serve --proxy-config proxy.conf.json",
1010
"tslint": "tslint \"src/**/*.ts\"; exit 0",
1111
"test": "ng test",

src/app/heroes/shared/hero.service.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ export class HeroService {
1111
private headers;
1212
private heroesUrl;
1313

14+
private static handleError(error: any): Promise<any> {
15+
window.alert(error._body);
16+
return Promise.reject(error.message || error);
17+
}
18+
1419
constructor(private http: Http,
1520
@Inject(APP_CONFIG) private appConfig: IAppConfig) {
1621
this.heroesUrl = this.appConfig.endpoints.heroes;
@@ -67,9 +72,4 @@ export class HeroService {
6772
.then(() => null)
6873
.catch(HeroService.handleError);
6974
}
70-
71-
private static handleError(error: any): Promise<any> {
72-
window.alert(error._body);
73-
return Promise.reject(error.message || error);
74-
}
7575
}
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)