API source code for The Butcher's Market website (http://thebutchersmarket.com).
You will need the following things properly installed on your computer.
git clone <repository-url>
this repositorycd butchers-market-api
npm install
- Copy the
.env.example
file and rename it to.env
(this file is private)
npm run db:create
npm run db:migrate
npm run db:seed
npm start
npm run start:dev
will auto restart when files changenpm run start:debug
will run in debugger mode- In Chrome, navigate to
chrome://inspect
- Click on the "Inspect" link to launch the debugger window
- In Chrome, navigate to
Deployed using Render!
List of common scripts you'll use with Sequelize.
Creating a new model will create a new database table and a corresponding model. In the example
below, we are creating a Special
model with a single attribute of title
.
sequelize-esm model:generate --name Special --attributes title:string
Creating a new migration will create the database scripts needed to change the underlying database table.
sequelize-esm migration:generate --name special-link
Once you create a new table, you'll probably want to add some seed data to it. In the example below,
we are creating a seed for the Special
model.
sequelize-esm seed:generate --name special