5 ms·
Show HN: Chunk – Code sandbox for back-end devs
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!
- deleted 4y ago[deleted]
- hemloc_io 4y agoNeat will check it out later! Wanted to leave a comment b/c you have a typo on the front page. "Scrap the web"
- xnx 4y agoAlso "Scrapping"
- masukomi 4y agoI was kinda hoping it was a rallying cry. "Scrap the web! We can do better!"
- theochampion 4y agoAh! Thanks for the heads up!
- dennisy 4y agoThis looks great, but what is the actual purpose?
- rad_gruchalski 4y agoLooks like a faas.
- dsanchez97 4y agoI 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 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 4y agoThanks! 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 4y agoHow 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 4y agoIn 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.
- theochampion 4y agoGood question! We use the Deno (https://deno.land https://deno.land) runtime which comes with built it permissions mgmt
- theochampion 4y agoIf we were to support more runtimes, I think I'd go for Firecracker (https://github.com/firecracker-microvm/firecracker/ https://github.com/firecracker-microvm/firecracker/) which is what AWS uses for lambdas
- bluehatbrit 4y agoHow 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 4y agoGlitch 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.
- bluehatbrit 4y agoThe 5min inactivity shut down is only for free accounts though, is chunk going to continue to run my app 24/7 on a free tier? The boilerplate code part sounds interesting, so chunk is also a bit of a framework? That's really nice, could speed up development a lot more. You're totally right about glitch taking a while to get going with. Does that framework restrict users in anyway, can it be ignored?
- masukomi 4y ago> 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 4y agoNgrok 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
- theochampion 4y agonot a trivial concept*
- deleted 4y ago[deleted]
- throwaway893483 4y agoThis looks really cool! Just a heads up I sent a message to the chunk Twitter account about a small problem I noticed.
- theochampion 4y agoSaw your message, thanks again for the heads up!
- nlitened 4y agoI 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 https://github.com/babashka/nbb
- theochampion 4y agoCool! What would be your usages if you don't mind sharing? First time hearing about nbb, its cool, I will definitely look into it
- nlitened 4y agoSure. I use Make.com (former Integromat) for many automations for my small business, and while quite handy, the automations are cumbersome to edit and very limited. Pretty often I have to resort to something dumb like composing a complex JSON by hand or using a third-party web-service token just to unzip a file. Sometimes I rage too much, wanting to rewrite the whole script of visual blocks in four simple lines of Clojure, but the complexity of deploying that four-lines webhook (or scheduled task) online cools me down pretty quickly, and I just give up.
- theochampion 4y agoThanks for sharing! The no-code approach taken by these automation apps (Make, Zapier..) makes them super accessible, but i agree, when any kind of business logic is involved nothing beats a few lines of code. You could setup a Chunk as only one "step" of a Make/Zapier workflow. Giving you code-control only where you need it. We could probably make that even easier by building integration for Make and Zapier.
- nickphx 4y agoI 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 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 4y agoGood catch! Thanks for the heads up, I will get right on it!
- theochampion 4y agoThe fix should be up now.
- sscarduzio 4y agoThis is amazing, how do I access the HTTP request query parameters and headers?
- theochampion 4y agoThere 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?
- sscarduzio 4y agoAuthentication, mainly.
- theo_champion 4y agoIts possible now! See: https://twitter.com/chunkdotrun/status/1555160919503691777 https://twitter.com/chunkdotrun/status/1555160919503691777
- sscarduzio 4y agoThank you!
- solardev 4y agoIs this kinda like Integromat meets Cloudflare Workers?
- theo_champion 4y agoYes, thats a pretty good way to summerize it!
- zoomzoom 4y agoThis 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.