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

Env variables for local dev #82

Open
kyleboon opened this issue Aug 20, 2021 · 2 comments
Open

Env variables for local dev #82

kyleboon opened this issue Aug 20, 2021 · 2 comments

Comments

@kyleboon
Copy link

I'm not sure which of these environment variables are required for local development and which I could just give a dummy value to:

ACCOUNT_TYPE: process.env.ACCOUNT_TYPE,
  PROJECT_ID: process.env.PROJECT_ID,
  NEXT_PUBLIC_API_KEY: process.env.NEXT_PUBLIC_API_KEY,
  PRIVATE_KEY_ID: process.env.PRIVATE_KEY_ID,
  PRIVATE_KEY: process.env.PRIVATE_KEY.replace(/\\n/g, '\n'),
  CLIENT_EMAIL: process.env.CLIENT_EMAIL,
  CLIENT_ID: process.env.CLIENT_ID,
  LICHESS_API_KEY: process.env.LICHESS_API_KEY,
  LAMBDA_REDIS_PORT: process.env.LAMBDA_REDIS_PORT,
  LAMBDA_REDIS_ENDPOINT: process.env.LAMBDA_REDIS_ENDPOINT,
  LAMBDA_REDIS_PW: process.env.LAMBDA_REDIS_PW,

I had to define a PRIVATE_KEY env var to get it to build, and when I tried to load the landing page I got this error:

FirebaseAppError: Service account object must contain a string "client_email" property.
    at FirebaseAppError.FirebaseError [as constructor] (/Users/z002nd2/Documents/workspace/PGNBuddy-V3/node_modules/firebase-admin/lib/utils/error.js:44:28)
    at FirebaseAppError.PrefixedFirebaseError [as constructor] (/Users/z002nd2/Documents/workspace/PGNBuddy-V3/node_modules/firebase-admin/lib/utils/error.js:90:28)

I've never used firebase so I'm not super familiar with it, but if I need to sign up for an account and use my own information for these, I could do that.

@trevor-ofarrell
Copy link
Owner

Hi! I should probably sort out a better way for people to be able to jump into to local dev, but in the meantime, I'd say sign up for a free firebase account, and replace all the configs in fire-config.js, firebaseAdmin.js, firebaseClient.js, and make a .env file with your own Firebase credentials. As well as making a https://upstash.com/ free account for the server-less redis, or running a redis instance locally. And of course making a lichess API key. Let me know if you run into any other issues!

@kyleboon
Copy link
Author

kyleboon commented Aug 20, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants