server.js
// -- WRITE YOUR CALLBACK FUNCTIONS FOR THE ROUTES HERE --
WRITE YOUR CALLBACK FUNCTIONS FOR THE ROUTES HERE
WRITE YOUR CALLBACK FUNCTIONS FOR THE ROUTES HERE
function renderHome(req,res) {
    const url ='https://thesimpsonsquoteapi.glitch.me/quotes?count=10'
    superagent.get(url).set('User-Agent', '1.0').then((dataFromApi =>{
        const apiData = dataFromApi.body.map(data =>{
            return new Character(data)
        })
        res.render('index' , {characters : apiData})
    })).catch(error =>(console.log(error)))
}
function renderHome ( req , res ) { const url = 'https://thesimpsonsquoteapi.glitch.me/quotes?count=10' superagent . get ( url ) . set ( 'User-Agent' , '1.0' ) . then ( ( dataFromApi => { const apiData = dataFromApi . body . map ( data => { return new Character ( data ) } ) res . render ( 'index' , { characters : apiData } ) } ) ) . catch ( error => ( console . log ( error ) ) ) }
WRITE YOUR CALLBACK FUNCTIONS FOR THE ROUTES HERE
WRITE YOUR CALLBACK FUNCTIONS FOR THE ROUTES HERE