Skip to content

An basic API REST with MySQL as database to register students into courses 🥸.

Notifications You must be signed in to change notification settings

j4vierb/express-api-courses

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express API REST about courses

This project is only to build a demo to learn how to use Express.js and MySQL. To configure it only change the database connection params in .-config.js, it should to look like this:

const config = {
  db: {
    host: "localhost",
    user: "root",
    password: "password",
    database: "college",
    connectTimeout: 60000
  },
  listPerPage: 10,
};

export default config;

Model-View-Controller architecture

| ---------- |
|   View     |
| ---------- |
| Controller |
| ---------- |                   | ---------- |
|   Model    | <- D. Injection - |  Services  |
| ---------- |                   | ---------- |

Features

  • Hacer validaciones parciales en el controlador utilizando Schema.partial().safeParse();.
  • Instalar una libreria para solucionar el problema de CORS.
  • Terminar implementación del endpoint del recurso courses.
  • Definir las reglas de negocio para courses. Refactorizar el recurso de students.
  • Refactorizar la validación de las reglas de negocio del servicio al modelo.
  • Añadir las pruebas de postman en collections.
  • Agregar las validaciones de las reglas de negocio.
  • Agregar seguridad y autenticación.
  • Agregar pruebas unitarias.

About

An basic API REST with MySQL as database to register students into courses 🥸.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published