Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample API for react-hooks-mst-example repo

API to made React Hooks MST example works.

Made with Express and Mongoose and is literally my first experience making some backend (can I already consider myself a full-stack developer?).

Based on the schema of the same large company API React Hooks MST what example was made for, but a bit different - they have some strange things, maybe because of legacy.

Work in progress!

Routes

Persons

Main thing this app about

  • GET /persons ?limit=NUMBER&from=NUMBER - persons list

  • GET /persons/:id - get single person info

  • POST /persons {} - add person

  • PUT /persons/:id - edit person

  • DELETE /persons/:id - delete person

  • GET /persons/find ?name=STRING - find

  • some kind of request to save order

Organizations

In original app it was huge thing, same (or even more big) as persons, but here its only to get list of organizations you can put person when create/edit

  • GET /organizations - list of organizations

Clear persons list

  • DELETE /delete-all-persons - delete all entries in persons list

Reset to initial state

  • POST /restore-default-data - will restore original persons mocks

About

Sample API for react-hooks-mst-example repo

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages