Express Authentication Template
This is a simple Express app which uses JWT based authentication.
Features
- User registration
- User login
- Email Verification
- Authentication Middleware
- Password Reset
Tech Stack
- Node.js
- Express
- PostgreSQL
- Prisma ORM
- Resend Email API
- Argon2 Password Hashing
How to use
Local Development
- Clone the repository
- Install dependencies using
npm install
- Rename
.env.example
to .env
and fill in the required details
- Run the server using
npm start
or npm run dev
(for development)
Docker
- Clone the repository
- Rename
.env.example
to .env
and fill in the required details
- Run
npm run docker:build
to build the Docker image
- Run the following command to run the Docker container
docker run --env-file .env.prod --name <container name> -d --network=<network name> -p 3000:3000 express-auth
Contributing
- Fork the repository
- Open an issue or feature request
- Create a new branch (
git checkout -b feature
)
- Commit your changes (
git commit -am 'Add new feature'
)
- Push to the branch (
git push origin feature
)
- Create a new Pull Request
- Get your changes merged