frontend/api.js
// + Creates a new address book and returns the book id of the new address book.
+ Creates a new address book and returns the book id of the new address book.
+ Creates a new address book and returns the book id of the new address book .
async function createBook (bookName) {
  const response = await fetch('http://localhost:3600/new', {
    method: 'POST',
    headers: {
      Accept: 'application/json',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ name: bookName })
  })
  return await response.json()
}
async function createBook ( bookName ) { const response = await fetch ( 'http://localhost:3600/new' , { method : 'POST' , headers : { Accept : 'application/json' , 'Content-Type' : 'application/json' } , body : JSON . stringify ( { name : bookName } ) } ) return await response . json ( ) }
+ Creates a new address book and returns the book id of the new address book.
+ Creates a new address book and returns the book id of the new address book .