Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"js/ts.tsdk.path": "node_modules/typescript/lib"
}
1 change: 1 addition & 0 deletions client/.env.local.sample
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
VITE_API_ENDPOINT=http://localhost:3000
VITE_FRONTEND_ORIGIN=http://localhost:5173
VITE_ALLOWED_HOSTS=
12 changes: 9 additions & 3 deletions client/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { defineConfig, loadEnv } from "vite";

// https://vite.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
return {
plugins: [react(), tailwindcss()],
server: {
allowedHosts: env.VITE_ALLOWED_HOSTS?.split(",").filter(Boolean) ?? [],
},
};
});
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
- "127.0.0.1:5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data

Expand Down
Loading