title: How to configure google service key json file using .env configuration
body: <p>I am creating an webservice in nodejs using google service api key and during the development phase i've put the file locally and test like this ...everythink was ok.</p>
  
  <p>Now i have to deploy in firebase and i have to make unvisible the configuration file . 
  Do you have experience how to make this using .env file ?</p>
  
  <p>The configuration file is like this : </p>
  
  <pre><code>{
    "type": "service_account",
    "project_id": "xxxx-eeee",
    "private_key_id": "xxxw342234",
    "private_key": "-----BEGIN PRIVATE KEY-----client_id": "xxxxxxxxxxxx",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://oauth2.googleapis.com/token",
    "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
    "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/xxxxxxxxxxxxxxxx.iam.gserviceaccount.com"
  }
  </code></pre>
  
  <p>Now i access the file using this code : </p>
  
  <pre><code>const translate = new Translate(
      {
          projectId: 'my-project-0o0o0o0o'
          keyFilename: './my-project.json
      }
  );
  </code></pre>
  
  <p>Who can help me with the steps that i have to access this file without publishing the credentials in github then in firebase</p>
  
  <p>UPDATED 13.02.2020</p>
  
  <p>i created .env file to store there my credentials like this : </p>
  
  <pre><code> SEPA_TRANSLATE_PROJECT_ID="4354-4545"
      SEPA_TRANSLATE_GOOGLE_API_KEY_TYPE="service_account"
      SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_PRIVATE_KEY_ID="43434"
      SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nMM=\n-----END PRIVATE KEY-----\n"
  
      SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_CLIENT_EMAIL="googletranslateaaaaapi@aaaaa-aaaa.iam.gserviceaccount.com"
      SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_CLIENT_ID="34234"
      SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_AUTH_URI="https://accounts.google.com/o/oauth2/auth"
      SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_TOKEN_URI="https://oauth2.googleapis.com/token"
      SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_AUTH_PROVIDER_X509_CERT_URL="https://www.googleapis.com/oauth2/v1/certs"
      SEPA_TRANSLATE_GOOGLE_SERVICE_CLIENT_X509_CERT_URL="https://www.googleapis.com/robot/v1/metadata/x509/googletranslatewerwer%erwerwre-werwr.iam.gserviceaccount.com"
  </code></pre>
  
  <p>now the my-project.json file look like : </p>
  
  <pre><code>{
        "type": process.env.SEPA_TRANSLATE_GOOGLE_API_KEY_TYPE,
        "project_id": process.env.SEPA_TRANSLATE_PROJECT_ID,
        "private_key_id": process.env.SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_PRIVATE_KEY_ID,
        "private_key": process.env.SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_PRIVATE_KEY
        "client_email": process.env.SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_CLIENT_EMAIL,
        "client_id": process.env.SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_CLIENT_ID,
        "auth_uri": process.env.SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_AUTH_URI,
        "token_uri": process.env.SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_TOKEN_URI,
        "auth_provider_x509_cert_url":process.env.SEPA_TRANSLATE_GOOGLE_SERVICE_KEY_AUTH_PROVIDER_X509_CERT_URL,
        "client_x509_cert_url": process.env.SEPA_TRANSLATE_GOOGLE_SERVICE_CLIENT_X509_CERT_URL
      }
  </code></pre>
  
  <p>this json is called : </p>
  
  <pre><code> const translate = new Translate(
          {
              projectId: 'my-project-0o0o0o0o'
              keyFilename: './my-project.json
          }
      );
  </code></pre>
  
  <p>when i test my api i got this error message now : error translate text: SyntaxError: Unexpected token p in JSON at position 13</p>