Skip to content

Api para generar el listado de productos en formato lista negra

Notifications You must be signed in to change notification settings

fabriciovz/api-blacklist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Black List Generator

To generate the black list, black list without exclude items, and just exclude items

alt text

Dependencies

Run locally an instance of MySQL

docker run --name mysql8 \
-e MYSQL_ROOT_PASSWORD=root -e MYSQL_USER=homestead -e MYSQL_DATABASE=bl_db -e MYSQL_PASSWORD=secret \
-p 3306:3306 mysql:8.0.18 --default-authentication-plugin=mysql_native_password

Then you have to access to mysql

docker exec -it mysql8 mysql -u homestead -p

Then select bl_db

use bl_db

Create the black_list table

DROP TABLE IF EXISTS `black_list`;
CREATE TABLE `black_list` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sku` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2400 DEFAULT CHARSET=utf8;

And create the black_list_exclude table

DROP TABLE IF EXISTS `black_list_exclude`;
CREATE TABLE `black_list_exclude` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sku` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2401 DEFAULT CHARSET=utf8;

Load the black list from bl_list.sql file

Info

1.- Create Environment Variables:

  • MYSQL56_USER = homestead
  • MYSQL56_PASSWORD = secret
  • MYSQL56_HOST = "127.0.0.1" (local)
  • MYSQL56_PORT = 3306

2.- Run locally api-blacklist

3.- Remember you have a postman collection into the root folder called: bl_generator.json

About

Api para generar el listado de productos en formato lista negra

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published