Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#3 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
express, mongodb, nodejs, typescript
Ambito
api, backend, database

Direzione di ricerca

Inizia ispezionando la struttura del repository e la configurazione esistente del progetto prima di pianificare l’implementazione. L’issue identifica i livelli necessari —configurazione, modelli, servizi, controller, route, validazione e gestione degli errori— e indica .env, Postman e ThunderClient come punti di ingresso rilevanti. Il lavoro è considerato completato quando le operazioni CRUD funzionano per la risorsa scelta, MongoDB utilizza il database di .env e l’API è documentata e testata funzionalmente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
TypeScript
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DontStopPrograming/Backend_standard

Tutte le issue di DontStopPrograming/Backend_standard

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.