Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

haoshiyou/haoshiyou-server

Repository files navigation

Haoshiyou-Server, an API server for haoshiyou.org

Build Status

Haoshiyou-Server is the server for haoshiyou.org. Please find more Developer Documentation under docs

Powered by StrongLoop/ApiConnec

Quick Start

  1. Start the MySQL server on your MacBook

  2. Start the Server using API Connect

Open SLC GUI:

slc arc

then open a browser to go to http://127.0.0.1:3000/,

Open API Connect GUI

  • Though GUI, first run in haoshiyou-server folder,
apic edit

then open a browser to go to http://127.0.0.1:9000/,

Query

then query the server by

curl --request GET \
  --url 'http://0.0.0.0:3000/api/HsyListings' \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-ibm-client-id: default' \
  --header 'x-ibm-client-secret: SECRET' \
  --insecure

Through UI

  • Through CLI, run npm start

Working with Ionic

Generate Angular2 SDK

./node_modules/.bin/lb-sdk server/server \
<client source code> \
-d ng2web -i disabled -v enabled

for example, for haoshiyou-dev

./node_modules/.bin/lb-sdk server/server \
../haoshiyou-dev/haoshiyou/src/loopbacksdk \
-d ng2web -i disabled -v enabled
./node_modules/.bin/lb-sdk server/server \
../haoshiyou-ai/loopbacksdk \
-d ng2web -i disabled -v enabled

or for haoshiyou-bot

./node_modules/.bin/lb-sdk server/server \
../haoshiyou-bot/v1/loopbacksdk \
-d ng2web -i disabled -v enabled

or for haoshiyou-ai

./node_modules/.bin/lb-sdk server/server \
../haoshiyou-ai/loopbacksdk \
-d ng2web -i disabled -v enabled

Release to Heroku

git push heroku master

Migrate to a New DataBase

How to use a new MySQL in ApiConnect(formerly StrongLoop)