Home > Web Front-end > JS Tutorial > body text

Nest-Connect API using NestJs, PassportJs, and Prisma

王林
Release: 2024-09-06 18:30:10
Original
1003 people have browsed it

Nest-Connect API using NestJs, PassportJs, and Prisma

Nest Connect

In-progress REST API with all basic features real social media has. Open to all contributions during development.

Getting Started

  1. Clone the repository: git clone https://github.com/saidMounaim/nest-connect.git
  2. Install dependencies: npm install
  3. Create a .env file in the root and add the following
DATABASE_URL=""

JWT_SECRET=""

CLD_CLOUD_NAME=""
CLD_API_KEY=""
CLD_API_SECRET=""
Copy after login

Features:

  • registering and logging to user account
  • posting photos
  • commenting and liking photos
  • following system
  • all CRUD operations on posts, comments, follows and likes with relevant permissions

Technology Stack:

  • NestJs
  • PassportJs
  • Prisma

Default urls:

  • Login User : localhost:3000/api/auth/login
  • Register User : localhost:3000/api/auth/register
  • Update Password : localhost:3000/api/auth/updatePassword
  • Get Logged in User : localhost:3000/api/auth/me
  • Get All Posts : localhost:3000/api/posts
  • Get Single Post : localhost:3000/api/post/:postId
  • Create Post : localhost:3000/api/posts
  • Update Post : localhost:3000/api/post/:postId
  • Delete Post : localhost:3000/api/post/:postId
  • Get All Comments : localhost:3000/api/comments
  • Add Comment : localhost:3000/api/post/:postId/comments
  • Update Comment : localhost:3000/api/comment/:commentId
  • Delete Post : localhost:3000/api/comment/:commentId
  • Get All Likes By Post : localhost:3000/api/post/:postId/likes
  • Like Post : localhost:3000/api/post/:postId/like
  • Unlike Post: localhost:3000/api/post/:postId/unlike
  • Get All Users : localhost:3000/api/users
  • Get Single User : localhost:3000/api/user/:userId
  • Search User : localhost:3000/api/users?search=john

Contribution

All kind of contributions are welcome, please feel free to submit pull requests.

  • Version: 1.0.0
  • License: MIT
  • Author: Said Mounaim

The above is the detailed content of Nest-Connect API using NestJs, PassportJs, and Prisma. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!