forked from CenturyLinkLabs/panamax-contest-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
image_api_with_cloudinary.pmx
39 lines (36 loc) · 1.05 KB
/
image_api_with_cloudinary.pmx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
name: Image API with Cloudinary
description: "Simple image api using nodejs, mongo and cloudinary for image storage.\r\n\r\nThis
template is great as a starter nodejs app. Fork from https://github.com/kennethklee/images-api."
keywords: ''
type: NodeJS
documentation: |-
images-api
===========
This is a very basic node image api that uses Mongo & Cloudinary.
Set your environment variables on the Web Tier:
`NODE_ENV` - Set to `production` to use cloudinary, otherwise, it'll fallback to empty images.
`CLOUD_NAME` - Cloudinary cloud name
`CLOUD_KEY` - Cloudinary access key
`CLOUD_SECRET` - Cloudinary access secret
API Endpoints are
GET /images
POST /images
GET /images/:id (works with JSON or HTML)
DELETE /images/:id
images:
- name: mongo_latest
source: mongo:latest
category: Data Tier
type: Default
- name: kennethkl_images-api
source: kennethkl/images-api:latest
category: Web Tier
type: Default
ports:
- host_port: '8000'
container_port: '8000'
proto: TCP
links:
- service: mongo_latest
alias: mongo