Skip to content

Wework-like service-oriented architecture photos application. Built with NodeJS, and CouchDB; tested with New Relic, Loader.io, and K6; and optimized with Redis and NGINX.

Notifications You must be signed in to change notification settings

sdc-wework/photos-service

 
 

Repository files navigation

Photos Service

This service provides the photo url and meta data.

Related Projects

Table of Contents

  1. Usage
  2. Requirements
  3. Development

Usage

Requirements

An nvmrc file is included if using nvm.

  • Node 6.13.0
  • Mongo 4.4.1

Development

First time set up:

Run seeding scripts (mongo must be installed and running)

npm run seed

Start server

npm run server:dev

Installing Dependencies

From within the root directory:

npm install -g webpack
npm install

Spacework photos service REST API

Endpoint

/api/photos

GET

Photo data by photo id - /api/photos/:id

Photos data by workspace id - /api/photos/workspace/:workspaceId

POST

New photo data - /api/photos/
Request body example
  {
      "url": "http://www.imageurl.com/",
      "description": "Description goes here"
  }

PUT

Update photo url and/or photo description - /api/photos/:id
Request body example (can have url and/or description)
  {
      "url": "http://www.imageurl.com/",
      "description": "Description goes here"
  }

DELETE

Photo data by photo id - /api/photos/:id

All workspace photo data - /api/photos/workspace/:workspaceId

About

Wework-like service-oriented architecture photos application. Built with NodeJS, and CouchDB; tested with New Relic, Loader.io, and K6; and optimized with Redis and NGINX.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.0%
  • Shell 1.4%
  • Dockerfile 0.6%