Skip to content
/ CHEX Public

Cannabis Hemp Exchange (CHEX) is a two-sided B2B marketplace, commodity exchange, and distribution platform.

License

Notifications You must be signed in to change notification settings

euglopi/CHEX

Repository files navigation

chex-app

Demo of B2B White-Label Marketplace (Commodity Exchange) & eCommerce https://www.youtube.com/watch?v=xuqaOt4d6Bg

Local environment

In progress!

Setup

cp .env.local .env
nvm use 9
yarn install

Gotcha

There is a known bug right now where the app connects to heroku, before using local env

Replace

https://app-chex.herokuapp.com/

with

http://localhost:4200

Database

brew install mysql
brew install redis

Setup mysql

sudo mysql
CREATE DATABASE chexdb;
CREATE USER 'chex'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL PRIVILEGES ON chexdb.* TO 'chex'@'localhost';

Load initial schema

mysql -u chex --password=password chexdb < backup/exchange_2020-02-24.sql

Start up

Start the main app

yarn start
open http://localhost:4200/

Debuging

yarn dev-debug

Docker

Start docker

docker-machine start default
eval $(docker-machine env default)

Build and run docker

source .env.docker.dev
docker-compose build
docker-compose up

Debug in docker

docker-compose run exchange bash

Set up local network

Add to `/etc/hosts/

192.168.99.100  app.chexlocal

where 192.168.99.100 is output of docker-machine ip

Open the app

http://app.chexlocal:4200/

Deployment

Heroku

Initial setup

heroku stack:set container

Load db schema

mysql --host=us-cdbr-iron-east-04.cleardb.net --user=b9a83d5bcc7be2 --password=74979e26 --port=3306 heroku_a3faaac90eee8f3 < backup/exchange_2020-02-24.sql

Deploy new version to heroku

To deploy to Heroku

Setup heroku-cli - https://devcenter.heroku.com/articles/heroku-cli

Add remote

heroku git:remote -a app-chex

Push to heroku git, this will trigger Heroky deploy

git push heroku master

Chex API

API documentation is generated via https://apidocjs.com/

open http://localhost:4200/api/docs/

About

Cannabis Hemp Exchange (CHEX) is a two-sided B2B marketplace, commodity exchange, and distribution platform.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published