Creating the Login Endpoint
Learn how to use a login endpoint for authentication in Deno.
We'll cover the following...
Previously, we created the business logic and data fetching logic. Now we can start using it in our web layer.
Creating a login route
Let’s create the POST /api/login
route, which should let the user log in with their username and password. Follow these steps:
- In
src/web/index.ts
, create the login route: