1.0.0 • Published 3 months ago

grupohost-backend v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

grupohost backend

This repro will manage the brand new backend for grupo host. It will use express.js.

To start the server:

npm run start

To start the server with live reload:

npm run dev

Open http://localhost:8080 with your browser to see the result.

You can access to any endpoint using the /:model or /:model/:id format. Also you can access to /old/:model that will connect to old MaiaDB.

GET resquest for /:model will SELECT all records. You can pass query parameters to limit, orderBy, columns, conditions.

Example:

old/translations?columns=langid&columns=alias&limit=4&conditions=langid=2

GET resquest for /:model/:id will SELECT one record. You can pass the query parameters columns in order to get only specific columns.

PATCH resquest for /:model/:id will UPDATE one record. You need to pass all the properties to be updated in the BODY of the request.

POST resquest for /:model will INSERT a new record. You need to pass all required properties in the BODY of the request.

The response will return