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 knex = require('knex')({ | |
client: 'pg', | |
connection: { | |
host: '127.0.0.1', | |
user: '*****', | |
password: '**********', | |
database: 'espn', | |
}, | |
}); |
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
/* | |
Overview | |
This is a brief overview of the process to seed data into my database for the Twitch Video Service Module. | |
The trickiest part was importing the sample data into the seeding file that inserts the data into the database. | |
I ran into issues where the seed file could not find the custom modules for the sample data, so I decided to | |
put the sample data into the same file as the seeding file. | |
*/ | |
// package.json script in package.json |
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
/* | |
Overview | |
This displays an api call to 'http:localhost/3049/api/videos' to retrieve all videos in the database. | |
The hardest part was acutally figuring out how to fetch the data properly using bookshelf syntax. | |
*/ | |
app.get('/api/videos', (req, res) => { | |
Videos.reset() | |
.fetch() | |
.then((videos) => { |
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
Verifying my Blockstack ID is secured with the address 1K6as63jrfoSgN1a7rWetohoa23Xmz68fP https://explorer.blockstack.org/address/1K6as63jrfoSgN1a7rWetohoa23Xmz68fP |