Skip to content

Conversation

@HeleneWestrin
Copy link

Vercel link

Test the API »

Copy link
Contributor

@HIPPIEKICK HIPPIEKICK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well structured and quite advanced project, nice that you broke it up into chunks and dared to go further than the requirements! Love your eagerness as well, it's not until next week we're working with POST requests 😉

};

// Add a new book
export const addBook = (req, res) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, ambitious ⭐

Comment on lines +21 to +23
const saveBooks = (books) => {
fs.writeFileSync(booksFilePath, JSON.stringify(books, null, 2));
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to change the books.json file?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Matilda! ☺️🙏
Yes, it writes to books.json and adds the new book at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants