top | item 32267862

Show HN: Chunk – Code sandbox for back-end devs

96 points| theochampion | 3 years ago |chunk.run | reply

Chunk co-founder here. We spent the last 2 weeks building this to scratch our own itch:

As developers, we often have problems that could be solved just by running a few lines of code. Sometimes, running this code on your local machine is fine. But other time, the code need to run automatically reacting to external events or to run continuously, which means, it needs to run on a server somewhere.

So now, you have to find a cloud provider, to package or build the code and finally to deploy it. All of that for what could be literally be 4 lines of code.

We couldn’t find an easier way to do this, so we built it.

Chunk is an all in one web editor (think of the codesandbox experience) that allows you to write, deploy and run a piece of code in the cloud from a variety of triggers: HTTP, WebHook, manual or scheduled (cron).

No setup, no build, no deploy. Chunk makes you go from idea to code running in the cloud in seconds.

Let me know what you guys think!

35 comments

order
[+] dsanchez97|3 years ago|reply
I really like yalls website design and UX; especially around scheduling the functions to run. I am working on the same problem in Python space at https://cdevframework.io, but I am building it first as a client side SDK. Mostly chose that way because I don't have much frontend skills! Impressive that you could getting this up and going so quickly!
[+] theochampion|3 years ago|reply
Thanks! I really like your client side SDK approach, giving users the ability to use their own IDE / tools is always a plus. (+ building a web IDE is a pain haha)
[+] bluelightning2k|3 years ago|reply
How do you safely run untrusted user code?

Thanks for building this.

(Won't use it personally as being a pro developer I'd always use my existing cloud provider)

[+] z3t4|3 years ago|reply
In nodejs you can use the vm module. And for extra layers you can run node itself in a linux namespace aka container. Inside a VPS that has selinux. On a dedicated server with no LAN access besides the gateway. In a fireproof datacenter.
[+] bluehatbrit|3 years ago|reply
How does this compare to glitch.com? As far as I can tell the only real difference is the support for scheduled jobs, but I feel like I'm probably missing something more fundamental. Maybe it's just trying to be better version? Looks cool none the less, will check it out!
[+] theochampion|3 years ago|reply
Glitch is definitely the closest in terms of usage. We in fact used Glitch ourselves quite a lot. But even running the simplest piece of code on Glitch still requires you to write all the boilerplate code (e.g. setting up a node express HTTP server).

And of course, Glitch stops every instances after 5min of inactivity and it takes a solid 30sec to wake them up after.

Glitch is unbeatable in the frontend part. But we want to make the backend dev experience more seamless.

[+] masukomi|3 years ago|reply
> But other time, the code need to run automatically reacting to external events or to run continuously, which means, it needs to run on a server somewhere.

why couldn't this be solved much more easily with ngrok or one of its competitors?

[+] theochampion|3 years ago|reply
Ngrok and reverse proxies in general are an option. But it's a trivial concept, and you'd still need to run your machine 24/7
[+] nickphx|3 years ago|reply
I noticed a 'bug'. If you click 'New chunk' from the 'Explore' page you're taken to /c/new without a session and will end up at a blank page.

Navigated to https://chunk.run/c/new 09:11:33.510 [slug]-844c1730038cbd0f.js:1 got user sessions null 09:11:33.517 [slug]-844c1730038cbd0f.js:1 Creating new chunk. 09:11:33.517 [slug]-844c1730038cbd0f.js:1 No user logged in.

[+] theochampion|3 years ago|reply
Good catch! Thanks for the heads up, I will get right on it!
[+] zoomzoom|3 years ago|reply
This is awesome and in general I couldn’t be more excited about platforms that integrate the loop from building to deploying in one place. Similar tools include glitch, replit, codesphere.

I’m the cofounder of Coherence (withcoherence.com) which is in early beta to bring the same experience to a more typical VSCode cloud IDE/infra as code in your own cloud/CI setup that a software team working on full stack containerized apps would use.

[+] nlitened|3 years ago|reply
I think that’s a neat idea because I’ve been wanting something like this for several weeks :)

Please consider adding ClojureScript via nbb[0] as a language option.

[0] https://github.com/babashka/nbb

[+] theochampion|3 years ago|reply
Cool! What would be your usages if you don't mind sharing?

First time hearing about nbb, its cool, I will definitely look into it

[+] throwaway893483|3 years ago|reply
This looks really cool! Just a heads up I sent a message to the chunk Twitter account about a small problem I noticed.
[+] theochampion|3 years ago|reply
Saw your message, thanks again for the heads up!
[+] sscarduzio|3 years ago|reply
This is amazing, how do I access the HTTP request query parameters and headers?
[+] theochampion|3 years ago|reply
There is currently no way to access the HTTP request query params and headers, but we could add it (probably as part of the context obj).

What is your use-case if you don't mind me asking?

[+] solardev|3 years ago|reply
Is this kinda like Integromat meets Cloudflare Workers?
[+] hemloc_io|3 years ago|reply
Neat will check it out later!

Wanted to leave a comment b/c you have a typo on the front page.

"Scrap the web"

[+] masukomi|3 years ago|reply
I was kinda hoping it was a rallying cry. "Scrap the web! We can do better!"
[+] xnx|3 years ago|reply
Also "Scrapping"