##how to install and use:
- Clone the repo
- use develop1 branch
- install node_modules : "npm i"
- if you want to change port, use ".env" file ( now it's 5500)
- for developer mode use "npm run dev"
- for production mode use "npm run prod"
- fot testing: a) run server "npm run dev" b) run tests "npm run test"
app is be used for storage persons array.
Person{ "name":"SomeName", age:"18", hobbies: [] of String of empty array }
request examples:
-
to get all persons GET http://localhost:5500/person (without "/" in the end of the link!!)
-
to get person by id GET http://localhost:5500/person/${id} (without "/" in the end of the link!!)
-
to add new person POST http://localhost:5500/person (without "/" in the end of the link!!) request body: { "name": "Kolia", "age": "33", "hobbies": [ "Rock", "cooking" ] } response : request person with id
-
to change any object property of person by id PUT http://localhost:5500/person/${id} (without "/" in the end of the link!!) request body: { "name": "SomeNewName" } or you can change 2-3 object properties at one time
-
to delete any person by id DELETE http://localhost:5500/person/${id} (without "/" in the end of the link!!)