Skip to content

This is a REST api that allows authenticated users to save their favorite bookmarks ✨ in the app's database. Users can register and sign in then proceed to add their favorite online links.

License

Notifications You must be signed in to change notification settings

maxlar01/bookmarks-api-nestjs

Repository files navigation

Bookmarks REST API using Nest.js Nestjs

preview

Table of Contents 📖

Introduction ✨

This is a REST api that allows authenticated users to save their favorite bookmarks in the app's database. Users can register and sign in then proceed to add their favorite online links. Authentication and authorization are handled using signed JWT. The project uses the Nest.js framework and PostgreSQL database along with Prisma as an ORM for the backend. Automated e2e tests are made using Jest and Pactum.

Get started 🚀

  • Before you get started, make sure that you have yarn package manager enabled. If not, then kindly follow the official docs here.
  • Also make sure that you have Docker installed so that you can get a local database.
  1. First clone the repo
gh repo clone maxlar01/bookmarks-api-nestjs
  1. Navigate to the root directory and install project dependencies
yarn install
  1. Start the database container
yarn db:dev:up
  1. Create ".env" and ".env.test" files and add the environment variables: DATABASE_URL and JWT_SECRET. For the DATABASE_URL, grab the user and password from the docker-compose.yml file. The JWT_SECRET can be any random string. For the ".env.test", make sure to use the test database port which is specified in the docker-compose.yml file.

  2. Run the app

yarn start:dev
  1. To run e2e automated tests
yarn test:e2e
  1. You can test the API endpoints manually using Insomnia, Postman or any other similar tool you prefer.

License 🔑

You can read more about it here.

About

This is a REST api that allows authenticated users to save their favorite bookmarks ✨ in the app's database. Users can register and sign in then proceed to add their favorite online links.

Topics

Resources

License

Stars

Watchers

Forks