feat: add cloud functions

This commit is contained in:
lzh
2023-12-08 10:28:04 +08:00
parent bc0bcbd686
commit 8ae8feeb82
4 changed files with 17 additions and 53 deletions
+1
View File
@@ -27,6 +27,7 @@
"@angular-devkit/build-angular": "^14.2.9",
"@angular/cli": "~14.2.9",
"@angular/compiler-cli": "^14.2.0",
"@azure/static-web-apps-cli": "^1.1.6",
"@types/jasmine": "~4.0.0",
"jasmine-core": "~4.3.0",
"karma": "~6.4.0",
+8 -1
View File
@@ -1,10 +1,17 @@
import { Component } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-root',
template: `<div>{{message}}</div>`,
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
export class AppComponent {
message = '';
isCollapsed = false;
}
constructor(private http: HttpClient) {
this.http.get('/api/message')
.subscribe((resp: any) => this.message = resp.text);
}
}
+1 -1
View File
@@ -7,7 +7,7 @@ import { NzMessageService } from 'ng-zorro-antd/message';
providedIn: 'root',
})
export class ApiService {
_baseUrl = 'http://127.0.0.1:5000/api/v1';
_baseUrl = '/api/';
constructor(
private httpClient: HttpClient,
private dialogService: NzMessageService