dev configuration for api
This commit is contained in:
@@ -5,8 +5,8 @@ run-name: "${{ gitea.event.head_commit.message }}: Deploy API"
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
#branches:
|
||||||
- main
|
# - main
|
||||||
paths:
|
paths:
|
||||||
- "api/**"
|
- "api/**"
|
||||||
- ".gitea/workflows/deploy-api.yaml"
|
- ".gitea/workflows/deploy-api.yaml"
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,3 +2,6 @@
|
|||||||
# empty for now
|
# empty for now
|
||||||
|
|
||||||
# .env # urrp I eated it :33
|
# .env # urrp I eated it :33
|
||||||
|
|
||||||
|
# this one is for real though
|
||||||
|
client/.env
|
||||||
|
|||||||
@@ -9,8 +9,9 @@ import type { User } from "../models/User.ts";
|
|||||||
|
|
||||||
const API_URL: string = "/users";
|
const API_URL: string = "/users";
|
||||||
|
|
||||||
|
const baseUrl: string = import.meta.env.DEV ? import.meta.env.VITE_DEV_API_URL : import.meta.env.VITE_PROD_API_URL; // TODO: overarching api service
|
||||||
const api = axios.create({
|
const api = axios.create({
|
||||||
baseURL: "http://10.145.164.106:5227/api"
|
baseURL: baseUrl
|
||||||
});
|
});
|
||||||
|
|
||||||
export const getUsers = () => api.get<User[]>(`${API_URL}`);
|
export const getUsers = () => api.get<User[]>(`${API_URL}`);
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
|
|
||||||
# idk yet
|
# idk yet
|
||||||
|
|
||||||
dotnet ./api/test.cs
|
#dotnet ./api/test.cs
|
||||||
|
|
||||||
|
set ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
dotnet run
|
||||||
|
|
||||||
|
npm run dev
|
||||||
|
|||||||
Reference in New Issue
Block a user