vercel / cosmosdb-server

A Cosmos DB server implementation for testing your applications locally.
MIT License
174 stars 30 forks source link

Can't hit REST API #19

Closed jrgp closed 5 years ago

jrgp commented 5 years ago

Hi,

I'm able to properly start the app (after installing with npm -g):

$ cosmosdb-server -p 3000
Ready to accept connections at [::]:3000

But I can't hit it:

$ curl localhost:3000
curl: (52) Empty reply from server

I'm on node v12.13.0 on RHEL7.

Do you know how I can proceed with this?

nkzawa commented 5 years ago

It's because the server only supports https protocol, so need to append https://.

 $ curl https://localhost:3000 --insecure

Also add the the --insecure (-k) option to bypass cert verification since the server uses a self signed cert.

jrgp commented 5 years ago

Thanks!