strip api prefix middleware
All checks were successful
Deploy Backend / deploy (push) Successful in 1m40s
All checks were successful
Deploy Backend / deploy (push) Successful in 1m40s
This commit is contained in:
parent
338f955c78
commit
e5bfa8afa0
@ -17,6 +17,8 @@ spec:
|
|||||||
namespace: traefik
|
namespace: traefik
|
||||||
- name: compress
|
- name: compress
|
||||||
namespace: traefik
|
namespace: traefik
|
||||||
|
- name: scoresaber-reloaded-backend-strip-api-prefix
|
||||||
|
namespace: public-services
|
||||||
services:
|
services:
|
||||||
- name: scoresaber-reloaded-backend-service
|
- name: scoresaber-reloaded-backend-service
|
||||||
port: 8080
|
port: 8080
|
||||||
|
10
.gitea/kubernetes/backend/strip-api-prefix-middleware.yaml
Normal file
10
.gitea/kubernetes/backend/strip-api-prefix-middleware.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: scoresaber-reloaded-backend-strip-api-prefix
|
||||||
|
namespace: public-services
|
||||||
|
spec:
|
||||||
|
stripPrefix:
|
||||||
|
prefixes:
|
||||||
|
- "/api"
|
@ -58,6 +58,7 @@ jobs:
|
|||||||
manifests: |
|
manifests: |
|
||||||
.gitea/kubernetes/backend/deployment.yaml
|
.gitea/kubernetes/backend/deployment.yaml
|
||||||
.gitea/kubernetes/backend/service.yaml
|
.gitea/kubernetes/backend/service.yaml
|
||||||
|
.gitea/kubernetes/backend/strip-api-prefix-middleware.yaml
|
||||||
.gitea/kubernetes/backend/ingress.yaml
|
.gitea/kubernetes/backend/ingress.yaml
|
||||||
images: |
|
images: |
|
||||||
git.fascinated.cc/fascinated/scoresaber-reloaded-backend:${{ github.sha }}
|
git.fascinated.cc/fascinated/scoresaber-reloaded-backend:${{ github.sha }}
|
||||||
|
@ -5,7 +5,7 @@ import { AppService } from "../service/app.service";
|
|||||||
export class AppController {
|
export class AppController {
|
||||||
constructor(private readonly appService: AppService) {}
|
constructor(private readonly appService: AppService) {}
|
||||||
|
|
||||||
@Get()
|
@Get("/")
|
||||||
getHello(): string {
|
getHello(): string {
|
||||||
return this.appService.getHello();
|
return this.appService.getHello();
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import { AppModule } from "./app.module";
|
|||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
const app = await NestFactory.create(AppModule, {
|
const app = await NestFactory.create(AppModule, {
|
||||||
logger: ["error", "warn"],
|
logger: ["error", "warn", "log", "fatal"],
|
||||||
});
|
});
|
||||||
await app.listen(8080);
|
await app.listen(8080);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user