Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.02 KB

README.md

File metadata and controls

45 lines (32 loc) · 1.02 KB

How to setup

  1. Install all node modules with yarn install

  2. Update database connections in database.json

  3. Log into mysql client with mysql -u root

  4. Create a new database user with the following commands

CREATE USER 'foo'@'%' IDENTIFIED WITH mysql_native_password BY 'bar';
grant all privileges on *.* to 'foo'@'%';

FLUSH PRIVILEGES;
  1. Create a new database named organic

  2. Exit mysql client (or open a new terminal)

  3. Install nodemon with npm install -g nodemon

  4. Add permission to run ./db-migrate.sh with `chmod +x ./db-migrate.sh

  5. Create the .env file like below, and fill in the details from your Cloudinary and Stripe account.

CLOUDINARY_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_SECRET=
CLOUDINARY_UPLOAD_PRESET=
DB_DRIVER=mysql
DB_PASSWORD=bar
DB_USER=foo
DB_DATABASE=organic
DB_HOST=localhost
STRIPE_PUBLISHABLE_KEY=
STRIPE_SECRET_KEY=
STRIPE_SUCCESS_URL=
STRIPE_CANCEL_URL=
  1. Run all migrations with ./db-migrate.sh up

  2. Add in dummy categories, brands and products as needed.