The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Creating Demo APIs with json-server

Creating Demo APIs with json-server

6:02
json-server makes it extremely easy to setup robust JSON apis to use for demos and proof of concepts. John walks you through the process of using pre-built json files for a server and how to generate larger datasets using lodash and faker.
Watch this lesson now
Avatar
egghead.io

json-server makes it extremely easy to setup robust JSON apis to use for demos and proof of concepts. John walks you through the process of using pre-built json files for a server and how to generate larger datasets using lodash and faker.

Avatar
Jaime

I didnt know there were such modules for Node. You made my day!! :) Thanks. Keep up the good work

Avatar
Flemming

Hi John and thanks for the video.

Iam trying to use the server to stub out rest calls from my backend, but I ran into problems with rest services behind an @ApplicationPath.

Lets say we have the following.

@ApplicationPath("/common")
@Path("/context")
public class ContextService {

@GET
public Context getContext() {
...
return ctx;
}

}

Angular will try and get data from http://localhost:9000/common/context but it seems like the json-server only supports one level in the json.

Any suggestions on how to solve that?

In reply to egghead.io
Avatar
Nicholas

Great tutorial. More node related tutorials like this would be fantastic. I didn't know about faker or json-server. Will be using them both in future.

Avatar
Fabricio

John, thanks a lot for this great lesson!
Quite useful.

Avatar
François

Hi John,

Thanks for the video, json-server is a great tool. I chose to replicate the REST stub approach on the client-side, and came out with FakeRest, which is kind of like json-server... without server.

It really helps e2e testing, especially CI setup.

Avatar
Daniel Winter

excellent, thats what i was searching for, thanks a lot!

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?