Skip to content

Liopun/blog-posts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blog-posts-assessment

Backend challenge for Hatchways

Features

  • An /api/posts route that handles the following query parameters:
    • tags (mandatory) : any number of comma-separated strings
    • sortBy (optional) : one of “id”, “reads”, “likes”, “popularity” defaults to "id"
    • direction (optional) : one of “asc”, “desc”, defaults to “asc"
  • Error handling:
    • Return an error message if:
      • Tags parameter is missing
      • sortBy or direction has an invalid value
  • Tests written in Jest
  • API caching

Running the app and tests

    npm install
    npm run dev --- for dev env
    npm run start --- for prod env
    npm run test --- for testing

About

Backend challenge for Hatchways

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published