text: const express = require('express');
  const routes = require('./routes');
  const sequelize = require('./config/connection');
  const path = require('path');
  
  const exphb = require('express-handlebars');
  const hbs = exphb.create({});
  
  app.engine('handlebars', hbs.engine);
  app.set('view engine', 'handelbars');
  
  
  
  
  const app = express();
  const PORT = process.env.PORT || 3001;
  
  
  app.use(express.json());
  app.use(express.urlencoded({ extended: true }));
  app.use(express.static(path.join(__dirname, 'public')));   // the public folder is served as static content
  
  // turn on routes
  app.use(routes);
  
  // turn on connection to db and server
  sequelize.sync({ force: false }).then(() => {
    app.listen(PORT, () => console.log('Now listening'));
  });
  