Giter Site home page Giter Site logo

nestjs-server's Introduction

Medium Level NestJS Project

The project is an example of a medium-level application developed using NestJS. The project includes the following features:

Directory structure

Overview

Project src structure directories.

src/
├─ app/
│  ├─ _common/
|  |  ├─ api/
|  |  ├─ enum/
|  |  ├─ model/
|  |  ├─ repository/
|  |  |  ├─ repository.ts
|  |  ├─ service/
|  |  |  ├─ service.ts
│  ├─ auth/
│  ├─ ...
│  ├─ email/
│  ├─ ...
│  ├─ user/
|  |  ├─ dto
|  |  ├─ enum
|  |  ├─ test
|  |  ├─ user.controller.ts
|  |  ├─ user.model.ts
|  |  ├─ user.module.ts
|  |  ├─ user.repository.ts
|  |  ├─ user.service.ts
│  ├─ app.module.ts
├─ core/
│  ├─ decorators/
|  |  ├─ authenticated-user.decorator.ts
|  |  ├─ public.decorator.ts
|  |  ├─ user-type.decorator.ts
│  ├─ environment/
|  |  ├─ config.ts
│  ├─ filters/
|  |  ├─ all-exception.filter.ts
|  |  ├─ http.exception.ts
│  ├─ guards/
|  |  ├─ jwt-auth.guard.ts
|  |  ├─ user-type.guard.ts
│  ├─ middlewares/
|  |  ├─ logger.middleware.ts
│  ├─ pipes/
|  |  ├─ validation.pipe.ts
│  ├─ strategy/
|  |  ├─ jwt.strategy.ts
│  ├─ tools/
   │  ├─ crypto.util.ts
│  ├─ app.module.ts
├─ mail.ts
└─

Installation and Setup

Install project dependencies using the following command.

npm install

Then, create an example .env file and add the necessary environmental variables before running the project.

cp example.env .env

Running

Start the project with the following command

npm run start

Testing

Use the following command to test the project.

npm run test

Usage

After successfully starting the project, you can access the API at http://localhost:3000.

Logging

Learn more about logging using Nest-Winston.

Validation

Request data validation using Class-Validator.

JWT (JSON Web Token)

Explore authentication and authorization using JWT (JSON Web Token).

Swagger

Get detailed information about API documentation using Swagger.

Middleware

Understand the concept of middleware using Middleware.

Exception Filters

Learn about exception filters using Exception Filters.

Pipes

Understand the concept of pipes using Pipes.

Guards

Explore the concept of guards using Guards.

Interceptors

Learn about interceptors using Interceptors.

Custom Decorators

Discover custom decorators using Custom Decorators.

Inspirations

nestjs-server's People

Contributors

ahmetfturgut avatar

Stargazers

 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.