Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: environment variable parsing #28

Merged
merged 2 commits into from
Mar 18, 2024
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
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ENDPOINT=http://localhost:3000
STORAGE_KEY=github-comment-jwt
REPO=stuyk/giscus
VITE_ENDPOINT=http://localhost:3000
VITE_STORAGE_KEY=github-comment-jwt
VITE_REPO=stuyk/giscus
VITE_GRAPHQL_ENDPOINT=http://164.92.143.81:8080/v1/graphql
10 changes: 5 additions & 5 deletions src/composables/useConfig.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export const useConfig = () => {
return {
ENDPOINT: import.meta.env.ENDPOINT ? import.meta.env.ENDPOINT : "http://localhost:3000",
STORAGE_KEY: import.meta.env.STORAGE_KEY ? import.meta.env.STORAGE_KEY : "github-comment-jwt",
PREVIOUS_LINK_KEY: import.meta.env.PREVIOUS_LINK_KEY ? import.meta.env.PREVIOUS_LINK_KEY : "previous-link",
REPO: import.meta.env.REPO ? import.meta.env.REPO : "stuyk/giscus-test",
DISCUSSION_REFRESH_TIME: import.meta.env.DISCUSSION_REFRESH_TIME ? import.meta.env.DISCUSSION_REFRESH_TIME : 5000,
ENDPOINT: import.meta.env.VITE_ENDPOINT ?? "http://localhost:3000",
STORAGE_KEY: import.meta.env.VITE_STORAGE_KEY ?? "github-comment-jwt",
PREVIOUS_LINK_KEY: import.meta.env.VITE_PREVIOUS_LINK_KEY ?? "previous-link",
REPO: import.meta.env.VITE_REPO ?? "stuyk/giscus-test",
DISCUSSION_REFRESH_TIME: import.meta.env.VITE_DISCUSSION_REFRESH_TIME ?? 5000,
};
};
2 changes: 1 addition & 1 deletion src/gql/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./fragment-masking";
export * from "./gql";
export * from "./gql";
Loading