Skip to content

Commit

Permalink
env nits
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecsl committed Feb 22, 2025
1 parent a7195f5 commit 7e50f3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ typings/
# dotenv environment variables file
.env
.env.test
.env.development
.env.production

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand Down
7 changes: 2 additions & 5 deletions src/client/realWsJsonClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ export default class RealWsJsonClient implements WsJsonClient {
headers: {
Pragma: "no-cache",
Origin: "https://trade.thinkorswim.com",
"Accept-Language": "en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7,es;q=0.6",
"Sec-WebSocket-Key": "MlZmMN1jaOpKsmb/eJSHCg==",
"User-Agent":
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36",
Upgrade: "websocket",
"Cache-Control": "no-cache",
Connection: "Upgrade",
Expand Down Expand Up @@ -377,7 +373,8 @@ export default class RealWsJsonClient implements WsJsonClient {
const {
credentials: { accessToken, refreshToken },
} = this;
const envPath = ".env";
const suffix = process.env.NODE_ENV ? `.${process.env.NODE_ENV}` : "";
const envPath = `.env${suffix}`;
let envContent = "";
if (existsSync(envPath)) {
envContent = readFileSync(envPath, "utf-8");
Expand Down

0 comments on commit 7e50f3f

Please sign in to comment.