- Node v16.15.0
- NPM 8.5.5
- MySQL 8.0.25
mysql -uroot -p
Enter password: *****
....
create database tickets;
At the root of the project:
npm i
Example environment file
NODE_ENV=dev
APP_NAME=api-tickets-service
PORT=3002
DB_USER=root
DB_PASS=root
DB_NAME=tickets
DB_HOST=localhost
DB_PORT=3306
DB_DIALECT=mysql
DB_TIMEZONE=false
DB_LOGGING=true
At the root of the project:
npm start
The database tables should be created automatically
At the root of the project:
npx sequelize-cli db:seed:all --url 'mysql://root:password@localhost/database_name'
Example:
npx sequelize-cli db:seed:all --url 'mysql://root:root@localhost/tickets'
At the root of the project:
npm run eslint