IGW Games

modern code, retro games


New Code Thing: cruddie-mock

My big focus in personal projects is obviously retro gaming, but sometimes I run into an annoying problem that hasn’t really been solved the way I want to, and have to dig in.

I do web-based stuff sometimes, and to get started it often helps to have some dummy data to work with – when I looked recently I found two useful modules: Faker, which let me create fake data, and JSON Server which would create a server with real data based entirely off a json object. These both helped, but there was quite a bit of work to fit together a json object with all of the fake data. So, I put the two together!

cruddie-mock is a globally-installed nodejs command that will spin up a RESTFul server based on a bunch of json files describing your models – complete with randomized-but-believable data. If the results aren’t clear, check out the application example, which can be run locally.

If this sounds useful, check it out on Github!

Leave a Reply