Lets initialise an express app that we will use to generate an authenticated backend
today.
index.js
file, open the project in visual studio codeexpress
as a dependencysigning up
and one for signing in
express.json
as a middleware to parse the post request bodyin memory
variable called users
where you store the username
, password
and a token
(we will come to where this token is created later.in memory variable
generateToken
that generates a random string for youin memory
variable for that user<aside> 💡
This can be improved further by
</aside>