This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GET home page. | |
router.get('/', function(req, res) { | |
res.redirect('/catalog'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var router = express.Router(); | |
// Require controller modules. | |
var book_controller = require('../controllers/bookController'); | |
var author_controller = require('../controllers/authorController'); | |
var genre_controller = require('../controllers/genreController'); | |
var book_instance_controller = require('../controllers/bookinstanceController'); | |
/// BOOK ROUTES /// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Sequelize = require('sequelize') | |
// models is optional based on app | |
const UserModel = require('./models/user') | |
const BlogModel = require('./models/blog') | |
const TagModel = require('./models/tag') | |
const dbname = 'DB_NAME'; | |
const dbuser = 'DB_USER'; | |
const dbpass = 'DB_PASS'; |