How to hide password from js file when connecting to database?
-
Kind. Using js, I connect to the database and perform the necessary manipulations, but the file contains a password, a login from the database. As far as I know, this data is hidden on the backend, but I don't understand this. Please tell me how to do this? And the second is the same question, when connecting to the API, where to hide the token?JavaScript Anonymous, Mar 9, 2020
-
Hide on the backend.Anonymous
-
Read about environment variablesMatthew Hull
-
Only on the backend, and strictly check who is knocking on you.Anonymous
3 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!