api-backend-server
v1.0.0
Published
A NestJS API backend server for a web application.
Readme
Description
This project is a codebase for a backend API developed with Nest, designed to be compatible with any type of application (management, messaging, etc.).
It natively integrates a JWT authentication system, follows a clear MVC architecture, and adheres to Clean Code principles.
The project structure is optimized, extensible, and easily customizable to fit your specific needs.
Project setup
- Clone dépôt git
git clone <https://github.com/Jedidiaamy-2427/nest-api-backend.git> cd api-backend-server - Install basic dependencies
npm install - Run the interactive setup script
This script will prompt you for the necessary information (project name, database type, ports, etc.), generate the
.envfile, and install the dependencies.
Sinpx ts-node scripts/setup.tsts-noden'est pas installé, lancez d'abord :npm install -D ts-node - Start the project
npm run start:dev
Docker Setup
To make it easier to install and run your application with Docker, follow these steps:
- Make sure you have Docker and Docker Compose installed on your machine.
- Create an
.envfile at the root of the project with the necessary environment variables (thesetup.tsscript can help you). - Build and start the Docker containers:
# Build application
$ docker-compose up --buildThe application will be accessible on the port defined in your .env file (default 3000).
API Documentation
The API documentation is automatically generated and available via Swagger. To access it, start the application and open your browser to:
http://localhost:3001/api-docsThis documentation will allow you to visualize and test the different routes of the API.
More info
- LinkedIn - Jedidia Amy
