Public | Automated Build

Last pushed: 12 days ago
Short Description
node-RESTfake . json-server fake REST Service
Full Description

@see [https://www.npmjs.com/package/json-server] ( https://www.npmjs.com/package/json-server)
@see: https://hub.docker.com/_/node/

json-server fake REST Service

run in docker container

<code>
docker run -it --rm --name my-fakeserver mfoerster16/node-restfake
</code>

<code>
docker run -it --rm -p 80:3000 --name my-fakeserver mfoerster16/node-restfake
</code>

<pre>or use with custom json </pre>

<code>
docker run -it --rm --name fakeserver -p 3000:3000 -v "$PWD":/usr/apps -w /usr/apps mfoerster16/node-restfake json-server customers.json
</code>

sample JSON DATA:

>
{
"customers": [
{
"id": 1,
"first_name": "John",
"last_name": "Smith",
"phone": "219-839-2819"
},
{
"id": 2,
"first_name": "Dieter",
"last_name": "Müller",
"phone": "219-839-28123"
},
{
"age": 12,
"done": true,
"id": 4,
"first_name": "John",
"last_name": "Lenre",
"birthday": "2015-05-23T18:25:43.511Z"
},
{
"id": 5,
"first_name": "Maria",
"last_name": "kleeblatt",
"birthday": "2015-05-23T18:25:43.511Z"
},
{
"first_name": "Peter",
"age": 23,
"done": true,
"id": 6
}
],
"servers": [
{
"id": "1",
"url": "www.web.de",
"subdomain": [
{
"count": 1
}
]
}
]
}
<

or let run a js script
<code>
docker run -it --rm --name my-running-script -v "$PWD":/usr/apps -w /usr/apps mfoerster16/node-restfake node myscript.js
</code>

Docker Pull Command
Owner
mfoerster16
Source Repository

Comments (0)