typicode / json-server

Get a full fake REST API with zero coding in less than 30 seconds (seriously)
Other
71.87k stars 6.93k forks source link

Please more info on SSL deployment, thanks! #566

Open medialove opened 7 years ago

medialove commented 7 years ago

I do not understand the information regarding ssl deployment. Does that translate to: "json-server does not support encrypted network connections natively, so please use a proxy that translates the unencrypted connection to an encrypted one to your client" ? If yes, please write it like this. Or do I misunderstand that?

tanguyantoine commented 7 years ago

You can use ngrok

if you are on mac

brew install ngrok // install ngrok
json-server db.json // launch your json server
ngrok http 3000 // proxy your request wih ngrok

You should see a screen like that :

screen shot 2017-06-24 at 16 43 05

then if you query curl https://231f6e67.ngrok.io/posts you should see data of your server

medialove commented 7 years ago

OK, so I think that answers my question with "yes, json-server does not support encrypted connections, but you can use any kind of proxy." - right?

Please note that in no way I think that it is a bad thing that json-server does not support encryted connections itself, that is totally ok - I just really wanted to have an explicit statement about the actual functionality to understand its feature set. I think it is a very useful piece of software!

Thanks!