Please complete this exercise which uses the Nest Framework.
The following application is feature complete, you do not need to add any additional features.
However the application is not perfect and needs refactoring and bug fixes. There are several things to fix, finding every issue is not required.
This is expected to take no more than 3 hours. Please do not exceed 3 hours.
If there isn't time to fix everything, you can simply point out what the issues are and how you would resolve it.
To start the development server run:
yarn start
To use watch mode run:
yarn start:dev
GET /
POST /create
- Create a book with at least the fields:
title
andauthor
. - Find books by author field.
- title
- string
- minimum of 1 character
- this field is required to create a new book
- this field must be unique
- author
- string
- minimum of 2 characters
- this field is required to create a new book
The following input json would create a book
{
"title": "A Short History of Nearly Everything",
"author": "Bill Bryson"
}
- return all books, sorted by title ascending, for all authors if no author is specified.
- return all books, sorted by title ascending, for a specific author.
The json data returned should at least have the following elements
[
{
"title": "A Short History of Nearly Everything",
"author": "Bill Bryson"
}
]
Choose one of the following
- provide a public repo
- zip all files and email