Sign inSign up

metal3d/json-server

By metal3d

•Updated almost 10 years ago

Dockerized json-server

Image
0

678

metal3d/json-server repository overview

⁠Dockerized json-server

json-server⁠ is a very nice REST API that serves a json file. It's pretty nice to test AngularJS implementation, http clients and so on.

Docker-json-server helps to launch this service without the need of installing node.js and dependecies

⁠Usage

Default working directory is "/project", exposed port is "3000".

To serve "db.json" file, do:

docker run --rm    \
    -v $(pwd):/project \
    -p 3000:3000   \
    metal3d/json-server --watch db.json

You may now access http://127.0.0.1:3000⁠

You may change uid:gid to use yours and be able to read/write file:

docker run --rm    \
    -v $(pwd):/project \
    -p 3000:3000   \
    --user="$(id -u):$(id -g)" \
    metal3d/json-server --watch db.json

Tag summary

Content type

Image

Digest

Size

254.3 MB

Last updated

almost 10 years ago

docker pull metal3d/json-server