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

Adding environment variables example #100

Merged
merged 2 commits into from
Dec 21, 2023
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
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# DB
NEXT_DB_NAME="databaseName"
NEXT_DB_USER="user"
NEXT_DB_PASS="pass"
NEXT_DB_HOST="domaindatabase.com"
NEXT_DB_PORT=33436


# TESTS
RUN_REAL_API_TESTS="false"
7 changes: 3 additions & 4 deletions src/config/squid.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { config } from "@/services/squid/squidConfig";
import { ChainId } from "@/services/useink/types";
import { getMandatoryVariable } from "@/utils/getMandatoryVariable";

export const squidConfig: Partial<Record<ChainId, string>> = config;

export const NEXT_DB_USER = getMandatoryVariable("NEXT_DB_USER");
export const NEXT_DB_PASS = getMandatoryVariable("NEXT_DB_PASS");
export const NEXT_DB_HOST = getMandatoryVariable("NEXT_DB_HOST");
export const NEXT_DB_USER = process.env.NEXT_DB_USER;
export const NEXT_DB_PASS = process.env.NEXT_DB_PASS;
export const NEXT_DB_HOST = process.env.NEXT_DB_PASS;
export const NEXT_DB_PORT = process.env.NEXT_DB_PORT
? parseInt(process.env.NEXT_DB_PORT)
: 23798;
Expand Down
Loading