{"repo":"leosuncin/nest-auth-example","free":true,"listed":false,"github":"https://github.com/leosuncin/nest-auth-example","clone":"git clone https://github.com/leosuncin/nest-auth-example.git","description":"Nest.js authentication with Passport. Realworld example","language":"TypeScript","stars":490,"topics":["nestjs","typescript","passport","rest-api","backend","postgresql"],"license":"MIT","category":"databases-storage","readme_excerpt":"🛂 Nest.js Authentication Example Nest.js authentication with Passport. RealWorld example Features - Authentication using Passport - Local and JWT strategies are implemented - TypeORM to connect with PostgreSQL - Unit tests, integration tests and E2E tests - ts-auto-mock with ttypescript to generate mocks with jest - Check code quality with MegaLinter - Check continuous integration with github actions - Run the necessary services with docker compose Run Locally Clone the project Go to the project directory Install dependencies Create a .env from the example one and customize it with your environment variables Start the services using Docker Compose Run migrations to create the DB schema Start the server Environment Variables To run this project, you will need to add the following environment variables to your .env file POSTGRES DB the name of the database to connect in the PostgreSQL instance (required) POSTGRES USER The name of the user to connect to the PostgreSQL instance (required) POSTGRES PASSWORD The password of the user to connect to the PostgreSQL instance (required) DATABASE URL a connection string to the PostgreSQL instance, example postgres://postgres @localhost/example-db (required) PORT the port that Nest.js will listen at (required) APP SECRET the secret used to encrypt the session (required) ALLOWED ORIGINS a comma separated list of origins from which accept request (required) You can copy the example .env and edit the values Running Tests To run unit tests, r","default_branch":null,"files":null,"tree":[],"storefront":"/r/leosuncin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/leosuncin/nest-auth-example/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}