CodePen for NGINX OSS Core

A recent post on Reddit r/nginx pointed out the availability of “Codepen for NGINX.”

This looks seriously cool. So I am posting the information with permission from the OP.

I’ve been working on a sort of CodePen for nginx.

It starts NGINX with a configuration supplied by you and then lets you run commands against it. There’s also some backends and static files available to allow testing more varied scenarios.

It also support creating snippets, which allows sharing of specific configurations in a cool “try, change & play with it” kind of way.

Would love to know what you think about a tool like this!

I’d like to know what you think and will pass pertinent comments over to “ProfessorLogout” as well.

davemc
Check it out

6 Likes

Whoa, this is rad. I’d love to know peoples’ thoughts too. Shout out to our friendlies at r/nginx!

2 Likes

Found my way over from Reddit, thanks a lot for the share and kind words @davemc!

Gonna keep my eyes on this thread as well in case any comments pop up.

3 Likes

Is there anything you’ve particularly enjoyed doing so far with the “change & play with it” approach? It’ll be interesting to see how people use it. I’m all for play :playground_slide:

1 Like

Happy to elaborate a bit on how I’m using it:

For teaching:
I’ve originally built this to facilitate me teaching trainees at work, which is still what I use it for a lot.
In that regard it’s becoming kind of my snippet library, which was just a folder of markdown files before.

Since I’ve also added more web servers, not only NGINX core, I also use it to explain the same concept, for example something like “how to pass headers to upstreams”, using different styles/paradigms of configuration.

For learning:
I also enjoy learning new things as well, so I have been using this to adapt things I know how to do with one web server to different web servers.

Isolated testing:
I find it quite useful for extracting out a specific part of a larger configuration and just tweaking it, having a very fast feedback cycle for changes.

Feedback from others:
From the feedback I’ve gotten from others they do similar things with the tool as of yet.
One thing I’m hoping to support in the near future that was highly requested is embedding of snippets for things like docs or blogs

Edit: Don’t know if the snippet feature might be a little bit too hidden on the UI currently, looks something like this once you create one: https://tech-playground.com/snippet/vehement-crafty-slug/

3 Likes

Pretty cool, @ProfessorLogout !

What’s the backing for this? Are you running an instance of NGINX in the cloud with some configuration? Or does this all run from httpbin.org?

2 Likes

Thanks @MikeJang !

It‘s basically a custom „function as a service“ system that starts a container in an isolated network for each request, mounts through the nginx config and commands and then runs both

Since I want it all isolated from the internet I host my own instance of httpbin in that isolated network and fudge a bit with name resolution to make it feel „like normal“

There’s also some other backends available: https://tech-playground.com/docs/server-playgrounds/#backends-and-isolation
And I‘d be happy to add some more, if you have any suggestions.

1 Like