Public | Automated Build

Last pushed: a year ago
Short Description
Exposes a REST API for MongoDB GridFS
Full Description

GridFS API







  • Exposes a REST API for MongoDB GridFS

Installation

npm install -g gridfs-api

Running server

To run a suite tests execute:

npm run build && npm run serve

API Documentation

create

curl -i -X POST 'http://localhost:3000/v1/files' \
 -F 'name=foo' \
 -F 'type=application/pdf' \
 -F 'metadata[userId]=1' \
 -F 'image=@/home/username/file.pdf'

show

curl -X GET 'http://localhost:3000/v1/files/1'

check-exists

curl -X GET 'http://localhost:3000/v1/files/1/check-exists'

delete

curl -X DELETE 'http://localhost:3000/v1/files/1'

Built with

  • nodejs Backend is a node-v.5.7.1.
  • koa API is a KOA app. It respond to requests RESTfully in JSON.
  • Mongodb Mongodb as a data store.

Docker

This repository has automated image builds on hub.docker.com.

Use docker-mongodb and run command described there

Finally run:

$ docker-machine start default
$ eval $(docker-machine env default)
$ docker run -it -e "NODE_ENV=development" -v "$(pwd)":/data --link mongo:mongo -w /data -p 3000:3000 rafaeljesus/gridfs-api
$ curl `docker-machine ip default`:3000

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

Maintaners

Docker Pull Command
Owner
rafaeljesus
Source Repository

Comments (0)