Get Started
Prerequisite
- Node.js please check version base on API repository.
- MariaDB version 10.9 or later.
Run in Local
clone project from https://github.com/gwingwin-cc/hypesdk-api
clone projectcopy .env.cloud to .env
$ git clone https://github.com/gwingwin-cc/hypesdk-api
$ cp .env.cloud .env
set .env file base on your settings
$ DATABASE_HOST=localhost$ DATABASE_PORT=3306$ DATABASE_USERNAME=root$ DATABASE_PASSWORD=0123$ DATABASE_DB=hype_project
Migrate and seed data
Do not forgot to create Database on MariaDB
$ node init-config.js && yarn run migrate:prod && yarn run migrate:prod:seed
Start Project
$ yarn start:prodor$ yarn start
Run with Docker
Pull image
$ docker pull tyroroto/hype-api:latest
Migration and seed data
$ docker run -e DATABASE_HOST=localhost \
-e DATABASE_PORT=3306 \
-e DATABASE_USERNAME=root \
-e DATABASE_PASSWORD=0123 \
-e DATABASE_DB=hype_project \
tyroroto/hype_api sh -c "node init-config.js && cat config/config.json && yarn run migrate:prod && yarn run migrate:prod:seed"
Start Project
$ docker run -d --name=hype_api_service \
-e DATABASE_HOST=localhost \
-e DATABASE_PORT=3306 \
-e DATABASE_USERNAME=root \
-e DATABASE_PASSWORD=0123 \
-e DATABASE_DB=hype_project \
-p 3000:3000 tyroroto/hype_api yarn start:prod
your project should working try in this list to checking.
Suggest https://dbeaver.io/ for community DBclient