- Exposes a REST API for MongoDB GridFS
npm install -g gridfs-api
To run a suite tests execute:
npm run build && npm run serve
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'
curl -X GET 'http://localhost:3000/v1/files/1'
curl -X GET 'http://localhost:3000/v1/files/1/check-exists'
curl -X DELETE 'http://localhost:3000/v1/files/1'
- 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.
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
- 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