Giter Club home page Giter Club logo

gridfs-api's Introduction

GridFS API

Codeship Status for rafaeljesus/gridfs-api Docker Image Pulls NPM version bitHound Overall Score bitHound Dependencies bitHound Dev Dependencies bitHound Code

js-standard-style

  • 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

gridfs-api's People

Contributors

rafaeljesus avatar

Stargazers

Jack Sullivan avatar 罗松 avatar  avatar Ronen avatar  avatar  avatar Alex Wilson avatar ZhangLei avatar Enieber Cunha avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

polinchw

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.