This question already has an answer here:
What is the proper way to save and access database and API credentials in my node js application? Currently I use a dotenv package and store them in a .env file. I am not uploading my code to github but keeping it private. This data is essential to the app itself and not user specific.