Create words-app directory then create a Next.js 13.3 application inside words-app that implements the following API to manage multiple collections of words. 1. Data is provided to you in words.json. The file contains an array of almost every word in the (American) English language. Copy that file to words-app/data/words.json. 2. Add an endpoint to search for a certain number of words using a query text. The number of matching words is selected at random and returned. Return 10 words when the number of words is not provided. You should return at most 100 words per request. 3. Add an endpoint to read all collections. This endpoint is also used to create collections. Store your collections and their corresponding words under words-app/data/ i did step 1 need step 2 and 3, I have word.Jays file but need how I can do step 2,3 ?!
Create words-app directory then create a Next.js 13.3 application inside words-app that implements the following API to manage multiple collections of words.
1. Data is provided to you in words.json. The file contains an array of almost every word in the (American) English language. Copy that file to words-app/data/words.json.
2. Add an endpoint to search for a certain number of words using a query text. The number of matching words is selected at random and returned. Return 10 words when the number of words is not provided. You should return at most 100 words per request.
3. Add an endpoint to read all collections.
This endpoint is also used to create collections. Store your collections and their corresponding words under words-app/data/
i did step 1 need step 2 and 3, I have word.Jays file but need how I can do step 2,3 ?!
![Method URL
GET
GET
POST
GET
Description
Returns an array of words, with size
/api/words/:query&count=:count count, all containing the string passed
in the query URL parameter.
Returns an array of all collections.
POST
DELETE
/api/collections
/api/collections
DELETE /api/collections/:name
/api/collections/:name
/api/collections/:name/:word
/api/collections/:name/:word
Creates a new collection. The name of
the collection is part of the request
body.
Returns an array of all words in the
collection with the provided name.
1 of 2
Deletes an empty collection with the
provided name.
Adds the provided word to the
collection with the provided name.
Deletes the provided word from the
collection with the provided name.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fbbc8a687-c0f0-429c-86f1-046930399c86%2F47e4314b-8e0b-4a6b-9aca-80fb1e9ab9e4%2Fcz7dvqu_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)