Skip to content

chayanikaa/westeros-beast-ledger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Westeros Beast Ledger ๐Ÿ‰

Welcome Maester Nodeon, you have inherited this ledger from your predecessor.

Complete the following tasks to turn this ledger into a wealth of information for all of Westeros.

Ahem, we're going to turn a little technical now.

  1. Serve all the files in the public directory on the '/' path of your app. This exposes a frontend that makes requests to the app.
  2. Create a GET /api/beasts to get all the records. The data can be found in data/beasts.json
    • Checkout the / route in your browser!
  3. Add support for query parameter species in the created endpoint. Return an array of records that match the type.
    • Checkout the Dragons and Dire wolves pages!
  4. Checkout the Register a Beast page. Create a handler for POST /api/beasts. Save this information back to data/beasts.json.

Finished? How about some additional challenges? ๐Ÿ˜

  1. Add support for saving the image file in the public/data/images directory. Save the path and other information back to data/beasts.json.

    1. Send file data with the form from the frontend by adding enctype to the form.
     <form action="/api/beasts" method="post" id="register-form"  enctype="multipart/form-data">
  2. Implement a PUT /api/beasts/:id endpoint to replace the details of a beast.

  3. Implement DELETE /api/beasts/:id endpoint to delete a beast from the ledger.

How did you organise your application?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors