Welcome to the NestJS Starter Project! This project provides a solid foundation to quickly get started with a NestJS application, complete with database connection, environment variable management, and essential scaffolding.
- NestJS: A progressive Node.js framework for building efficient and scalable server-side applications.
- TypeORM: A powerful and flexible ORM for connecting with MySQL.
- Environment Variables: Centralized configuration using environment variables.
- Docker: Containerized development environment with Docker support.
- pnpm: Fast, disk space-efficient package manager.
Before you begin, ensure you have the following installed:
-
Clone the repository:
git clone https://github.com/sangharshseth/nestjs-starter-project.git cd nestjs-starter-project -
Install dependencies:
pnpm install
-
Set up environment variables:
Create a
.envfile in the root directory and add your configuration. Refer to.env.examplefor required variables.DB_HOST=localhost DB_PORT=3306 DB_USERNAME=root DB_PASSWORD=password DB_NAME=nestjs_starter
-
Run the application:
pnpm start:dev
The application will start on
http://localhost:3000.
-
Build the Docker image:
docker build -t nestjs-starter . -
Run the Docker container:
docker run -p 3000:3000 --env-file .env nestjs-starter
The application will be available on
http://localhost:3000.