A non-real ecommerce store for selling chocolates.
Clone the repo from GitHub and then install the dependencies:
git clone https://github.com/Thoud/next-ecommerce-store
cd next-ecommerce-store
yarn
Setup a database with postgres on your machine:
psql <login>
CREATE DATABASE <database name>;
CREATE USER <username> WITH ENCRYPTED PASSWORD '<pw>';
GRANT ALL PRIVILEGES ON DATABASE <database name> TO <user name>;
Create a .env file with the credentials for the database inside your project directory. (Use .env.example as a template to create the file)
Use migration to populate the database:
yarn migrate up
If you need to delete the data again from the database you can use:
yarn migrate down
To run the development server:
yarn dev
To create the production build of the project run:
yarn build
yarn start
Create a Heroku account at Heroku - Sign up, and then follow the instructions there to deploy from GitHub.