Welcome to the NestJS Bookmark Backend App! This application allows users to sign in and bookmark links for later reference.
This backend application is built using NestJS on top of Express.js. It provides the following features:
- Authentication: Utilizes JWT with Passport for authentication, ensuring secure access to user accounts and bookmarks.
- Database: Powered by PostgreSQL, providing a robust and scalable storage solution for user data and bookmarks.
- ORM: Utilizes Prisma as the ORM (Object-Relational Mapping) tool, simplifying database operations and ensuring data integrity.
- Containerization: Docker is used for containerization, making it easy to deploy and run the application in various environments.
- API Testing: SuperTest and Pactum are employed for API testing, ensuring the reliability and functionality of the endpoints.
To run the NestJS Bookmark Backend App, follow these steps:
-
Clone the Repository: Clone this repository to your local machine using the following command:
git clone https://github.com/smh-kneonix/nestjs-bookmark-app.git
-
go to directory: cd into directory that project in that
cd nestjs-bookmark-app
-
config .env file: create .env file and config by your own preference
HINT
: if you use docker compose to run database you can use this environmentDATABASE_URL="postgresql://postgres:123@localhost:5434/nest?schema=public" JWT_SECRET="yoursecret"
-
install dependency: install packages from npm
HINT
: make sure you have npm install on your machinenpm install
-
run database: run postgres database
HINT
: make sure you have docker install on your machinenpm run db:dev:start
-
build and run the server: run nest server and you good to go
npm start
For detailed documentation of the API endpoints and their usage, install insomnia and follow this command
npx insomnia-documenter --config insomniaDocument.json --output insomnia-final-result
cd insomnia-final-result
npx serve
To run the tests for the NestJS Bookmark Backend App, follow these steps:
-
Navigate to the Project Directory: Open a terminal and navigate to the root directory of the project.
-
Run Test Script: Execute the following command to run the tests:
npm run test:e2e