Basically, I don't want my firebase credentials to show up in my github repo. This is what I have done so far.
// creds.js
const firebaseConfig = {
apiKey: "myapikey",
authDomain: "site-123.firebaseapp.com",
projectId: "site-123",
storageBucket: "site-123.appspot.com",
messagingSenderId: "9999999999",
appId: "1:1111111:web:jhg123hjjh123",
measurementId: "G-FFFFFFFFF"
};
export { firebaseConfig };
Now since I have exported this, I just import the credentials in my main.js
file.
// main.js
import { firebaseConfig } from "./creds.js"
const firebase = initializeApp(firebaseConfig)
const database = getDatabase(firebase)
Now, is it possible to "hide" the credentials file from my github repo?
**I don't use the command-line tool or github desktop**. I tried adding the filename to my .gitignore, but the file still shows up when I visit my repo with another account.
This is what my .gitignore looks like now
# Custom
creds.js
I visited similar questions, but couldn't find a solution. Any help is appreciated. Thanks in advance!