A
A
Alex_mos2020-10-12 15:11:36
Node.js
Alex_mos, 2020-10-12 15:11:36

How to make easy access to the site?

Tell me how to make simple authentication on the site, where you can read about it?
Site on express
As on some sites, such as demo access, where a login and password are provided, so as not to connect the database.

Is it possible, for example, to save the login and password in a variable, and when receiving data from the authorization form, compare the data and redirect to the page with content?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2020-10-12
@Alex_mos

https://www.tutorialspoint.com/expressjs/expressjs...
or even simpler
https://www.npmjs.com/package/express-basic-auth
https://habr.com/en/post/ 201924/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question