You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
400 B
JavaScript
9 lines
400 B
JavaScript
var config = require('./knexfile.js'); //requiring the knexfile that contains our connection object.
|
|
var knex = require('knex')(config); // imports knex with our connection object (found in knexfile).
|
|
|
|
// Export the knex library for use. All knex commands remain the same.
|
|
module.exports = knex;
|
|
|
|
// Run the latest DB migrations whenever the server starts.
|
|
knex.migrate.latest([config]);
|