Coder Social home page Coder Social logo

nainglinnphyo / nestjs-starter Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 3.0 649 KB

This starter kit provides a foundation for building scalable and maintainable server-side applications using Nest.js. It is designed to seamlessly integrate with Prisma Object-Relational Mapping (ORM) libraries for efficient data handling.

JavaScript 4.23% TypeScript 94.08% Dockerfile 1.20% Shell 0.49%
backend design-patterns nestjs prisma

nestjs-starter's Introduction

Nest.js Starter Kit

This starter kit provides a foundation for building scalable and maintainable server-side applications using Nest.js. It is designed to seamlessly integrate with Prisma Object-Relational Mapping (ORM) libraries for efficient data handling.

Features

  • Nest.js Framework: Utilizes the robust Nest.js framework for building scalable applications with TypeScript.
  • Prisma ORM Integration: Seamless integration with Prisma ORM for efficient database operations.
  • Custom Exception Handling: Implemented custom exceptions to handle errors gracefully.
  • Router Module: the route path for a handler is determined by concatenating the (optional) prefix declared for the controller.
  • Exception Filters: Added exception filters to centralize error handling and enhance application robustness.
  • Custom Decorators: Included custom decorator functions to extend functionality and simplify common tasks.

Prerequisites

  • Node.js (version >= 14)
  • npm or yarn

Getting Started

  1. Clone the repository:
git clone https://github.com/nainglinnphyo/nestjs-starter.git
cd nestjs-starter
  1. Install Dependencies
npm install
# or
yarn install
  1. Copy the example configuration file and edit with you credentials:
cp .env.example .env.development
  1. migrate and generate type
yarn migrate:dev

#in production

yarn migrate:deploy

#and

npx prisma generate
  1. Start the app
yarn start:dev
  1. View Swagger documentation

Once the application is running, navigate to /docs to view the automatically generated Swagger documentation.

  1. Docker Support The Nest.js starter kit is also available on Docker for easier deployment and containerization.

  2. Pull the Docker Image

docker pull devvps/nest-starter
  1. Run the Docker Container
docker run --env-file .env -p 3000:3000  devvps/nest-starter

Mount local machine .env and this will start the application in a Docker container, accessible on port 3000.

nestjs-starter's People

Contributors

nainglinnphyo avatar shin-thant avatar thukyaw11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.