Skip to content

laikhram/youpin-api

 
 

Repository files navigation

YouPin API

Build Status

API (dev environment): https://dev.api.youpin.city All data is sent and recieved as JSON.

API Documents

API Documents is auto-generated by apidoc and can be accessed at https://youpin-city.github.io/youpin-api-docs. Moreover, we also have POSTMAN examples that you can try by importing it to your own POSTMAN.

Run

Docker is needed to run your local YouPin API. After you have Docker, please follow the following instructions:

  1. Clone repo git clone git@github.com:youpin-city/youpin-api.git.

  2. Get credential GCS private key. Currently, YouPin API depends on Google Cloud Storage (GCS) to store photos and videos.

    1. Follow instruction 1.a to 1.f to get GCS private key.
    2. Rename the key to youpin_gcs_credentials_xxx.json where xxx is development for DEV environment or production for PROD environment.
    3. Place it under config/gcs/ (Ex. config/gcs/youpin_gcs_credentials_development.json)
  3. Setup your YouPin config. Always having config/default.json as a basic settings for DEV environment. If you want to run using PROD config, add additional config/production.json for PROD to replace some fields in default.json. Please find some useful templates under config/ folder itself.

  4. Start service with docker-compose up -d. The service will run on port 9100. To stop, run docker-compose stop. If you need to build a new docker image with modified code, run docker-compose up --build -d. To run on PROD, just add .env with the content NODE_ENV=production to YouPin root directory.

Changelog

0.1.0

  • Initial release

License

Copyright (c) 2016

Licensed under the MIT license.

Packages

No packages published

Languages

  • JavaScript 94.3%
  • HTML 5.7%