Building two models and figuring out structure
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
const express = require('express'),
|
||||
app = express(),
|
||||
router = express.Router(),
|
||||
port = process.env.PORT || 4200;
|
||||
|
||||
port = process.env.PORT || 4200,
|
||||
sequelize = require('./sequelize.js');
|
||||
|
||||
//define a route, usually this would be a bunch of routes imported from another file
|
||||
router.get('/', function (req, res, next) {
|
||||
@@ -17,4 +17,14 @@ router.get('/', function (req, res, next) {
|
||||
app.listen(port);
|
||||
|
||||
//log to console to let us know it's working
|
||||
console.log('Ucharify API server started on: ' + port);
|
||||
console.log('Ucharify API server started on: ' + port);
|
||||
|
||||
// //verify connection to db
|
||||
// sequelize
|
||||
// .authenticate()
|
||||
// .then(() => {
|
||||
// console.log('Connection has been established successfully.');
|
||||
// })
|
||||
// .catch(err => {
|
||||
// console.error('Unable to connect to the database:', err);
|
||||
// });
|
||||
|
||||
Reference in New Issue
Block a user