import express from 'express';

let listBooks = [
      { id:1, name:'Default Book' },
      { id:2, name:'ReactJs' },
      { id:3, name:'ReactJS + NodeJS + Redux' }
  ]
  
const app = express();



app.route('/')
  .get((req, res)=>{
    res.json(listBooks)
  })
app.get('*', (req, res)=> res.status(404).render('404'))
app.set('port', (process.env.PORT || 3000));



export default app;

@@ -164,18 +164,16 @@
 ' %7D%0A  %5D%0A
-  
 %0Aconst a
@@ -229,14 +229,8 @@
 s)=%3E
-%7B%0A    
 res.
@@ -248,12 +248,8 @@
 oks)
-%0A  %7D
 )%0Aap

clean code for config/app.js