Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit fbfa2d9

Browse files
committed
Use the host of the gui for the host of the api endpoint
1 parent 8b0c46c commit fbfa2d9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/app/app.module.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {BrowserModule} from "@angular/platform-browser";
33
import {AppRoutingModule} from "./app-routing.module";
44
import {AppComponent} from "./app.component";
55
import {DashboardModule} from "./pages/dashboard";
6-
import {ApiModule} from "chatoverflow-api";
6+
import {ApiModule, BASE_PATH} from "chatoverflow-api";
77
import {HttpClientModule} from "@angular/common/http";
88
import {BetterREPLComponent} from "./pages/betterrepl/betterrepl.component";
99
import {ThemeModule} from "../theme/theme.module";
@@ -21,7 +21,12 @@ import {ReactiveFormsModule, FormsModule} from "@angular/forms";
2121
FormsModule,
2222
ReactiveFormsModule
2323
],
24-
providers: [],
24+
providers: [
25+
{
26+
provide: BASE_PATH,
27+
useValue: `http://${window.location.hostname}:2400`
28+
}
29+
],
2530
bootstrap: [AppComponent],
2631
})
2732
export class AppModule {

0 commit comments

Comments
 (0)