Skip to content

Getting error of "Error: Data must be an object." when running through docker, but not if I just start json-server normally through cli #17

@MostHated

Description

@MostHated

Hello,
For some reason I keep getting the error of "Error: Data must be an object." when running through docker, but not if I just start json-server normally through cli.

This is the run.sh I was trying to use

#!/bin/bash

args="$@"

args="$@"
host="-H 0.0.0.0"
port="-p 9004"
dest="http://mysite.com/news/index.json"

json-server $args $port $host $dest

If I just run it like this, it works just fine. :

json-server -p 9004 -H 0.0.0.0 http://mysite.com/news/index.json

Thanks,
-MH

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions