In this project, we are using Nest framework .
$ npm install# simple way using docker-compose
$ make upor
# the hardway :D
# launch database with docker
$ npm run start:db
# launch serveur
$ npm run start:devgo to swagger => http://localhost:5000
take a look into database
Go to http://localhost:8080 and copy past the adminer.js file in the browser console
# unit tests
$ npm run test
POST http://localhost:5000/document
content-type: application/json
{
"document":{
"name":"68c0d0ssss8",
"type":"3",
"quantity":20
}
}
###
GET http://localhost:5000/document/284fe61f-b359-4e68-b31d-c7313935ef7c
content-type: application/json
###
PUT http://localhost:5000/document/284fe61f-b359-4e68-b31d-c7313935ef7c
content-type: application/json
{
"document":{
"type":"000",
"quantity":200003,
"obj":1001
}
}
###
GET http://localhost:5000/document/284fe61f-b359-4e68-b31d-c7313935ef7c/history
content-type: application/json
###
POST http://localhost:5000/document/284fe61f-b359-4e68-b31d-c7313935ef7c/diff
content-type: application/json
{
"version_1":1,
"version_2":2
}