Thanks for the comment! Yes you can use any NPM or Python package capable of doing that in Napkin. One limitation right now is that you cannot send back file data in responses, so you would have to upload to some external store like s3 and then return a url.
No boilerplate currently, we plan on adding a lot of examples to the site going forward. For now yes you would install any packages you need as you normally would from the "Modules" tab in the editor. More docs here as well: https://napkin.wiki/docs/javascript
Writing simple cloud functions right in the browser makes so much sense to me. I've used webtask.io before it was acquired and shut down. I had to switch to GCP cloud functions and it's lots of pain. Every time I want to run the function I need to deploy it first and it takes like a minute.
Playing with Napkin, it looks very promising. Just the things I need: write random code, test it right there, press deploy and get the endpoint right away.
Love that it's free for personal use. Just make sure you make enough money on paid plans and don't shut down like Webtask!
Ah, this is a nice idea, and it seems well executed, so nice work!
My first reaction was "well, of course stuff like 'configuring servers' and 'CI/CD' (from the philosophy page [0]) isn't just overhead, it's beneficial and indeed necessary complexity once you need certain guarantees from your software's behavior and the way you deploy it"
But, I'm sure you're already well aware! That probably isn't the point of what you've built, it seems like it has a lot more value in lowering the barrier to entry for writing backend code (perhaps for people who otherwise wouldn't have bothered), which can still be a lot of friction even using something like Heroku, for instance.
Thanks a lot! Yes currently those things definitely are beneficial and necessary at production scale; however, we're hoping we can chip away bit by bit at the need to configure these things yourself, starting with basic server(less) configuration.
What options do developers have for things like unit testing and organization as code bases scale? Are we restricted to a single “file” per endpoint? Is local development an option at all?
Unit testing - no unit testing yet but you can test out mock request data by using the Run Options tab in the Napkin editor.
Organization - folders and workspaces coming soon, but if you have any other ideas for this we'd love to hear it!
Right now you are restricted to single "file" per endpoint. In the future we plan to enable Napkin functions to reference each other which we hope will mitigate some of this limitation.
Local development is not currently an option; however, we plan to add Github integration some time this year, which would enable this. How we prioritize it will depend on how many users ask for it.
Cool, sounds like you have some cool milestones to work towards! I've thought a lot about a product like this and it's really cool to see that you guys have already got an MVP going. I would love to chat some time about current implementation and long term vision of Napkin if you're down! Maybe hearing my gripes will help you guys flesh out the road map lol
Essentially yes. It's an in browser editor that deploys your code as a public API endpoint as you type. It has the functionality of Lambda + API Gateway + Cloudwatch Logs with a lot of other utilities built in to expedite building small serverless functions
cloud9 ide is definitely a pioneer! We see Napkin as a part of the natural evolution in our productivity/dev tools, especially as we adapt to the advent of serverless architecture
Right now the goal is similar to that of cloud9 - provide an in-browser dev environment for quickly building apps; however, Napkin focuses on the serverless backend function and prototyping use cases. We want to streamline the UI to make writing and deploying Python and JS functions as quick as possible with 0 configuration. In the near future we will be adding some sharing/forking capabilities that we think will enhance this even further!
Not necessarily in this case. Firebase is a gateway to paid Firestore, Storage, and Google Cloud. They give away Auth for free and is ISO and SOC compliant. An argument can be made for their free analytics offering though.
To be clear, are you saying one shouldn't be concerned about running their webapp on Firebase/store because of the regulations surrounding what Google can do with that data? (customer usage changes for choosing when to start building competing products, for starters)
Is it possible to store the code in git or fossil or any vcs? Is there room for code review before deploying? I'm all for whatever editor people find useful, and for easier deployment, but at a glance this feels very similar to editing your cgi directly on the server.
Maybe all the devs that shot themselves in the foot editing php over sftp are getting old, and it's time for a new generation to learn that fear?
Thanks for reporting that! I just tried myself and seems to have worked. If you have any repro steps or other bug reports please do let us know anytime on twitter or at support@napkin.io . Thanks!!
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
[Previous line repeated 221 more times]
File "/var/lang/lib/python3.8/site-packages/pandas/__init__.py", line 11, in <module>
__import__(dependency)
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
[Previous line repeated 221 more times]
File "/var/lang/lib/python3.8/site-packages/numpy/__init__.py", line 150, in <module>
from . import core
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
[Previous line repeated 221 more times]
File "/var/lang/lib/python3.8/site-packages/numpy/core/__init__.py", line 9, in <module>
from numpy.version import version as __version__
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
[Previous line repeated 221 more times]
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 844, in exec_module
File "<frozen importlib._bootstrap_external>", line 939, in get_code
File "<frozen importlib._bootstrap_external>", line 1037, in get_data
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
File "/napkin-entrypoint", line 104, in _import
return original_import(name, *args, **kwargs)
[Previous line repeated 59 more times]
Thanks for sharing the stack trace. If you could share your username here or with nick@napkin.io I will dig deeper to see what's going on there. Pandas never fails to both assist and haunt me :)
Just used this to make a quick slackbot for my team each time our hasura database is updated with a new user. I’m so impressed since I don’t think I could have ever learned or implemented anything in the backend as quickly as I just did with this. Do you guys plan to add team collaboration features soon?
Thanks! Replit (and Glitch) are cool but ultimately they didn't pass our sniff test for production use cases. We believe our serverless architecture sets the foundation for the Napkin function to be a LEGO-like block to build complex systems at scale. We also like the idea of a simple isolated unit that can be shared. It's more lightweight, more understandable, and we'll be exploring ways to tackle discovery in the coming months :)
Hey! We're not yet open sourcing our tech during our beta period, but you can watch out for it here: https://github.com/napkinhq. We'll likely have a release for any open source tooling.
Saving / Deploying after every keystroke is not really what I want. I rather have a Save button so I have time to fix any errors because sometimes it just hangs there for a while saving/deploying something that I don't really need. In this topic, maybe seeing something more other than a progress bar, so I know that something is actually happening.
-
That’s great feedback, thanks so much. We want to perfect the editor experience as much as possible. It can’t ever completely replace local, though, so we hope we can release our API in the future for this use case.
No problem! I think an option to disable "auto-save" will just fix this for me. Because I always have to "wait" to press Run. I would rather wait after pressing Run.
Hey! If you’re familiar with the term JAMstack, you can think of us as the “A” for API’s. A static site like a blog typically doesn’t need any backend-specific functions but anything that requires a server to run you could use Napkin for. Popular frontend hosting platforms like Netlify and Vercel also have serverless function add-ons that can be attached to your project.
Our goal is to be the “CodePen for backend” and our one-off functions can be used for more than just websites (think mobile apps, IOT devices, etc). We’re excited to build out examples and enable discovery very soon!
If you're familiar with webhooks, you can code and deploy them easily with Napkin by just writing code in the editor and clicking "Deploy". With other tools, you usually have to install dependencies on the command line or set up more complex cloud services to do this. You can see an example of the webhook use case with this Slack bot example: https://napkin.wiki/slack
For a static website, there's a lot of great options that don't require a "backend" per se. Vercel and Netlify are great if you use React and/or Next.js. For a no-code solution you can check out Webflow. If you want to just serve static HTML/CSS/Javascript pages, my preference is to do that with just AWS S3 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/Hostin...).
Congrats on learning to code! If you ever want to chat about backend stuff feel free to reach out to nick@napkin.io :)
Thank you very much for the explanation and tips. I want to start with a static site as a proof of concept to show some friends. But eventually I would like to advance to a dinamic web app that can be used from tablets or phones.
Looks like napkin could help me start prototyping without having to learn the whole backend stack , which is just another complex new learning process to add on top.
72 comments
[ 2.9 ms ] story [ 119 ms ] threadOr do I just install the s3 package and do it like an express server?
[1]: https://github.com/captn3m0/ideas#svg-to-png-on-the-edge
This is what AWS Lambda should be.
Playing with Napkin, it looks very promising. Just the things I need: write random code, test it right there, press deploy and get the endpoint right away.
Love that it's free for personal use. Just make sure you make enough money on paid plans and don't shut down like Webtask!
My first reaction was "well, of course stuff like 'configuring servers' and 'CI/CD' (from the philosophy page [0]) isn't just overhead, it's beneficial and indeed necessary complexity once you need certain guarantees from your software's behavior and the way you deploy it"
But, I'm sure you're already well aware! That probably isn't the point of what you've built, it seems like it has a lot more value in lowering the barrier to entry for writing backend code (perhaps for people who otherwise wouldn't have bothered), which can still be a lot of friction even using something like Heroku, for instance.
[0] https://www.napkin.io/philosophy
Thanks so much for the questions!
Does it really deploy code as I type? So the functions are mostly broken while I'm editing them?
it's amazing having seamless code sharing between front end and backend, with inline code documentation.
I made a whole oauth server like this! https://observablehq.com/@endpointservices/auth
This is the first time I've come across this https://magic.link/ service. Logging in via email like this is a fascinating idea.
Maybe all the devs that shot themselves in the foot editing php over sftp are getting old, and it's time for a new generation to learn that fear?
Your demo on the homepage breaks if you try to `import pandas`
support@napkin.io
Two things I'd love: 1) code review (just like GitHub) 2) team collaboration
Awesome job y'all.
Saving / Deploying after every keystroke is not really what I want. I rather have a Save button so I have time to fix any errors because sometimes it just hangs there for a while saving/deploying something that I don't really need. In this topic, maybe seeing something more other than a progress bar, so I know that something is actually happening. -
I guess it is self evident for experienced programmers but from the site I can’t tell exactly what it does.
Our goal is to be the “CodePen for backend” and our one-off functions can be used for more than just websites (think mobile apps, IOT devices, etc). We’re excited to build out examples and enable discovery very soon!
Thank you very much.
For a static website, there's a lot of great options that don't require a "backend" per se. Vercel and Netlify are great if you use React and/or Next.js. For a no-code solution you can check out Webflow. If you want to just serve static HTML/CSS/Javascript pages, my preference is to do that with just AWS S3 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/Hostin...).
Congrats on learning to code! If you ever want to chat about backend stuff feel free to reach out to nick@napkin.io :)