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
/** | |
* @Desc : All of my data are seeded using this testing database(https://github.com/datacharmer/test_db) just import it to your local database server | |
*/ | |
const knex = require("knex") | |
const db = knex(require("./knexfile")["development"]) | |
const { bgCyan, bgRed, redBright, bold, underline } = require("colorette") // To add colors for stdout text | |
db.from("departments").select("*").first().then(res => { | |
console.log(bgCyan("Basic select:")) | |
console.log(res) |
NewerOlder