Skip to content

Implement crud operations with node & express

Notifications You must be signed in to change notification settings

Biniyamseid/nc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-crud-challenge

Implement Simple CRUD API

Your task is to implement simple CRUD API using in-memory database underneath.

Details:

  1. The task must be solved using only express and proveded packages in package.json. Any libraries and packages are prohibited.
  2. API path /person:
    • GET /person or /person/${personId} should return all persons or person with corresponding personId
    • POST /person is used to create record about new person and store it in database
    • PUT /person/${personId} is used to update record about existing person
    • DELETE /person/${personId} is used to delete record about existing person from database
  3. Persons are stored as objects that have following properties:
    • id — unique identifier (string, uuid) generated on server side
    • name — person's name (string, required)
    • age — person's age (number, required)
    • hobbies — person's hobbies (array of strings or empty array, required)
  4. Requests to non-existing endpoints (e.g. /some-non/existing/resource) should be handled.
  5. Internal server errors should be handled and processed correctly.
  6. Make sure the api is accesible by frontend apps hosted on a different domain (cross-site resource sharing)

About

Implement crud operations with node & express

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%