My first project with node.js.
A api using node.js for news, for post and get news with midia (image).
Run dbInstall.js
on "src" folder after configure your credentials on db.js
The ORM on this project is Sequelize, the database chosed is mysql.
This is request for get news limited by param qtd (Integer)
$ curl http://localhost:8080/news/{qtd}
This is request for post new news, using JSON with informations about.
{
"title": String,
"body": String,
"categoryid": Integer
}
This is request for attach midia (Image) on news, param idNews is integer, references news by id.
$ curl http://localhost:8080/news/midia/{idNews}
{
"image": Image (png, jpeg, jpg)
}
This is request for get a category for param id (integer).
$ curl http://localhost:8080/categories/{id}
This is request for create new category, to be used after on post news.
{
"description": String
}