feat(web) back-end routing
This commit is contained in:
@@ -20,6 +20,8 @@ interface QuoteResponse {
|
||||
};
|
||||
}
|
||||
|
||||
import { environment } from '../../environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'app-calculator',
|
||||
standalone: true,
|
||||
@@ -61,7 +63,7 @@ export class CalculatorComponent {
|
||||
this.error = '';
|
||||
this.results = null;
|
||||
|
||||
this.http.post<QuoteResponse>('http://localhost:8000/calculate/stl', formData)
|
||||
this.http.post<QuoteResponse>(`${environment.apiUrl}/calculate/stl`, formData)
|
||||
.subscribe({
|
||||
next: res => {
|
||||
this.results = res;
|
||||
|
||||
4
frontend/src/environments/environment.prod.ts
Normal file
4
frontend/src/environments/environment.prod.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
apiUrl: 'https://3d-fab.ch/api'
|
||||
};
|
||||
4
frontend/src/environments/environment.ts
Normal file
4
frontend/src/environments/environment.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
apiUrl: 'http://localhost:8000'
|
||||
};
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<title>Frontend</title>
|
||||
<base href="/">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
Reference in New Issue
Block a user