-
Install all node modules with
yarn install
-
Update database connections in
database.json
-
Log into mysql client with
mysql -u root
-
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;
-
Create a new database named
organic
-
Exit mysql client (or open a new terminal)
-
Install nodemon with
npm install -g nodemon
-
Add permission to run ./db-migrate.sh with `chmod +x ./db-migrate.sh
-
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=
-
Run all migrations with
./db-migrate.sh up
-
Add in dummy categories, brands and products as needed.