Code Monkey home page Code Monkey logo

jwt-nestjs-postgresql-sequelize-docker's Introduction

Nest Logo

NestJS Authentication Application with JWT

This is a NestJS application that provides a basic authentication system. The application exposes a few endpoints for user registration, login, users and posts.

The application uses PostgreSQL for user data persistence. JWT is used for authentication and token generation.

Prerequisites

Before you begin, ensure you have met the following requirements:

Running the Application

Docker

To run the application, follow these steps:

Build and run the Docker containers: docker-compose up --build -d the api runs on http://localhost:3000/

API Endpoints

The application exposes the following endpoints:

  • POST /auth/register: Register a new user.
  • POST /auth/login: Authenticate a user and return access token.
  • POST /posts: creates user post.
  • GET /posts: returns associated user private and public posts.
  • GET /posts/:id: returns a single post.
  • PATCH /posts/:id: updates a user post.
  • DELETE /posts/:id: removes a user post.
  • GET /users: returns registered users.
  • GET /users/:id: returns registered user by id.
  • PATCH /users/:id: updates user by id.
  • DELETE /users/:id: deletes user by id.

Environment Variables

The application uses the following environment variables for configuration:

  • POSTGRES_HOST=daily_express_postgres the postgres database docker container.
  • POSTGRES_PORT
  • POSTGRES_USER
  • POSTGRES_PASSWORD
  • POSTGRES_DATABASE
  • JWT_SECRET
  • AWS_S3_REGION
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • S3_BUCKET

License

This project uses the following license: MIT License.

jwt-nestjs-postgresql-sequelize-docker's People

Contributors

wasswarichard avatar

Stargazers

 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.