Skip to content

Commit

Permalink
fix: environment variable parsing (#28)
Browse files Browse the repository at this point in the history
* fix: environment variable parsing

* fix: lint
  • Loading branch information
Stuyk authored Mar 18, 2024
1 parent dda7a10 commit cda7a06
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
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";

0 comments on commit cda7a06

Please sign in to comment.