A opinionated starter template for building REST APIs with Express, Drizzle ORM and PostgreSQL.
- User registration
- User verification via email
- User deletion
- Admin routes
Returns the user. Requires AUTH_TOKEN in the request header.
Updates the user. Requires AUTH_TOKEN in the request header.
User can only update themselves. Properties that can be updated are name, email and password.
if email is updated, the user will be unverified and a new verification email will be sent.
Creates a new user. Requires name, email and password in the request body.
Verifies the user. Requires token and email in the query string.
Removes the user. Requires AUTH_TOKEN in the request header.
A user can only remove themselves. A admin can remove any user.
Logs in the user. Requires email and password in the request body.
Returns all users. It is an admin route, requires AUTH_TOKEN.
Returns all verified users. It is an admin route, requires AUTH_TOKEN.
Removes all unverified users. It is an admin route, requires AUTH_TOKEN.
Install the dependencies
pnpm installRun the development server:
pnpm dev