Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Create: Implementation of a CRUD REST API with Express.js and MongoDB

Đang mở
#3 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
express, mongodb, nodejs, typescript
Lĩnh vực
api, backend, database

Hướng nghiên cứu

Bắt đầu bằng cách kiểm tra cấu trúc repository và cấu hình dự án hiện có trước khi lập kế hoạch triển khai. Issue xác định các lớp cần thiết—cấu hình, model, service, controller, route, validation và xử lý lỗi—đồng thời nêu .env, Postman và ThunderClient là các điểm bắt đầu liên quan. Được xem là hoàn thành khi các thao tác CRUD hoạt động cho resource đã chọn, MongoDB sử dụng cơ sở dữ liệu trong .env, và API được ghi tài liệu cũng như kiểm thử chức năng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Implement a REST API that allows performing CRUD (Create, Read, Update, Delete) operations on a specific resource using Express.js, MongoDB, and Mongoose. The implementation should follow principles of separation if concerns, Clean Architecture, and best practices in managing routes, controllers, services, and models.

Task to complete:

1.Develop the project structure:

  • Set up a Node.js project with TypeScript
  • Organize the folder and file structure to reflect the separation of concerns

2.Configure MongoDB connection:

  • Create a configuration file for connecting to MongoDB using Mongoose.
  • Ensure the connection correctly uses the database specified in the .env file

3.Define the resource model and interface:

  • Create the resource interface(e.g. Vehicle) that reflects the required properties.
  • Implemente the Mongoose Schema and Model based on the interface

4.Implement CRUD services:

  • Develop service functions to handle CRUD operations for the resource
  • Ensure that service functions are decoupled from the controllers

5.Create controllers and routes:

  • Implement controllers that manage HTTP request for CRUD operations
  • Define and set up the corresponding REST routes in Express.js

6.Add validations and error handling:

  • Implement data validations in the controllers or models
  • Create an error-handling middleware to capture and manage exceptions in the API

7.Document the API:

  • Provice clear and concise documentation

8.Perform functional testing:

  • Use tools like Postman, ThunderClient to test and validate CRUD operations
  • Ensure that data is correctly stored, update and deleted in MongoDB

Criteria:

  • The API should allow performing all CRUD operations on the defined resource.
  • The database connection should be stable and use the database specified in the .env file
  • The project structure should follow Clean Architecture principles and coding best practices
Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DontStopPrograming/Backend_standard

Tất cả issue của DontStopPrograming/Backend_standard

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.