This web app will keep track of hacker phrases generated by visiting /next
.
Navigate using the links to see the next phrase, and to see all phrases.
As a user, I should be able to see how many phrases they've created so I can better manage the list.
On the /all
route, show a count in an <h2>
of how many phrases are in the "database"
As a user, I should be able to see a number next to each phrase so that I know what order I created them in.
Turn the unordered list into one that shows the order. (Hint: use a different HTML tag.)
On the /all
route, make each phrase a clickable <a href>
. When it is clicked, go to a new route /show/:id
Using the id
as the index, show only that one phrase.
On the /show/:id
page, add an <a href>
that displays the text "delete".
When you click it, it should go to the route /delete/:id
.
Using the id
as the index, remove that item from the Array of phrases.
On that page, tell the user that the phrase has been deleted.
Show them links to go back to /all
.
If you'd like to know more about the library used for generating the fake data, check out https://www.npmjs.com/package/faker
Bonus challenges:
- Add links (with routes) that add different kinds of fake data from the
faker
module!