Skip to content

Thoud/ecommerce-store

Repository files navigation

next-ecommerce-store

A non-real ecommerce store for selling chocolates.

Dependencies

Setup

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

Deployment

Create a Heroku account at Heroku - Sign up, and then follow the instructions there to deploy from GitHub.

Preview

Preview of Homepage Preview of the products page Preview of a single product Preview of the stripe checkout Preview of the order history

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •