У нас вы можете посмотреть бесплатно Run Seeders with Node JS and Sequelize - Rest API with NodeJS and MySQL (2020) или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Today we gonna Run Seeders with Node JS and Sequelize to insert some bulk set of data to the database in a single operation. Normally, we use seeds to insert some default set of data to the database. For a example when a project is deployed we may wanna insert some default users, categories and things like that. For that we use seeders. So, to demonstrate this, we gonna use a sequelize seeder example which is seeding some default categories to our category table. 0:00 Intro 2:31 Install and Configure Sequelize 3:01 Create a Seeder with Sequelize 7:37 Run seeder file 8:29 Undo a seed 9:40 Validate category ID when creating a post 13:47 Fix user ID with actual user ID decoded from the access token 17:18 Outro To use seeders with nodeJS, we need an ORM (Object Relational Mapping). Which is why we use Sequelize. Seeding a MySQL database with Sequelize is quiet easy. We can create a Seeder with the following command. sequelize seed:generate --name category-seeder This will create a Sequelize seeder file. Which we need to edit and enter our records we want to enter and save it. Now, we can run that seeder with the following command. sequelize db:seed --seed category-seeder That's it! And if you think you made a mistake, you can always undo a seed. To undo Sequelize seed run the following command. sequelize db:seed:undo --seed category-seeder You can always refer the Sequelize seeder documentation to learn more about Sequelize seeders. https://sequelize.org/master/manual/m... So, that's pretty much it in this Nodejs Sequelize seeder example. In the previous video we Implemented Image Uploader in NodeJS API • Implement Image Uploader in NodeJS API - R... This is the part 11 of the tutorial series, How to Create REST API with NodeJS and MySQL using Express and Sequelize. Watch the Series from the beginning: • Create REST API with NodeJS and MySQL (2020) Connect to Database with Sequelize: • Models, Migrations and Connecting to a Dat... Implement CRUD with NodeJS and Sequelize • Implement CRUD - Create, Read, Update and ... Implement Authentication with NodeJS and JsonWebToken • Authentication in NodeJS - REST API with N... Hit Subscribe and smash the Like button. Visit my blog: http://coderaweso.me Follow me on Instagram : / coderaweso.me Like me on Facebook : / coderaweso.me Follow me on Twitter : / coderaweso_me