Need solution for mongoDB un-hash password after npx create app

hello there…
i am new to strapi.

i have notes after the npx-create-strapi-app >> mongoDB
the database user name password is not hashed on config>database.js

what will be best practice?
thanks

The best practice is to pass them as runtime env variables, I mostly keep the username and password for development and on production I pass them with start command

No need to even put .env file

cross-env NODE_ENV=production MONGO_DB=somedb MONGO_PASS=somepass strapi start

Keep the same variable name in database.js file :slight_smile:

1 Like