diff --git a/.gitignore b/.gitignore index 173764d..36ffa86 100644 --- a/.gitignore +++ b/.gitignore @@ -169,9 +169,11 @@ $RECYCLE.BIN/ # Environment & Secrets # ============================================ .env -.env.* +.env.local +.env.*.local !.env.example -!.env.*.example +!.env.development +!.env.production *.pem *.key *.p12 diff --git a/frontend/.env.development b/frontend/.env.development new file mode 100644 index 0000000..155c3f6 --- /dev/null +++ b/frontend/.env.development @@ -0,0 +1,2 @@ +# Development environment defaults +VITE_GRAPHQL_ENDPOINT=http://localhost:5000/graphql diff --git a/frontend/.env.example b/frontend/.env.example new file mode 100644 index 0000000..6b6814c --- /dev/null +++ b/frontend/.env.example @@ -0,0 +1,7 @@ +# Books Frontend Environment Configuration +# Copy this file to .env.local and adjust values for your environment + +# GraphQL API endpoint +# Development: http://localhost:5000/graphql +# Production: /graphql (relative, proxied by nginx/ingress) +VITE_GRAPHQL_ENDPOINT=http://localhost:5000/graphql diff --git a/frontend/.env.production b/frontend/.env.production new file mode 100644 index 0000000..f48dbb8 --- /dev/null +++ b/frontend/.env.production @@ -0,0 +1,2 @@ +# Production environment - uses relative path (proxied by nginx/ingress) +VITE_GRAPHQL_ENDPOINT=/graphql