API (dev environment): https://dev.api.youpin.city All data is sent and recieved as JSON.
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.
Docker is needed to run your local YouPin API. After you have Docker, please follow the following instructions:
-
Clone repo
git clone git@github.com:youpin-city/youpin-api.git
. -
Get credential GCS private key. Currently, YouPin API depends on Google Cloud Storage (GCS) to store photos and videos.
- Follow instruction 1 to 9 to get GCS private key.
- Rename the key to
youpin_gcs_credentials_xxx.json
where xxx isdevelopment
for DEV environment orproduction
for PROD environment. - Place it under
config/gcs/
(Ex.config/gcs/youpin_gcs_credentials_development.json
)
-
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 additionalconfig/production.json
for PROD to replace some fields in default.json. Please find some useful templates underconfig/
folder itself. -
Start service with
docker-compose up -d
. The service will run on port 9100. To stop, rundocker-compose stop
. If you need to build a new docker image with modified code, rundocker-compose up --build -d
. To run on PROD, just add.env
with the contentNODE_ENV=production
to YouPin root directory.
0.1.0
- Initial release
Copyright (c) 2016
Licensed under the MIT license.