Lurker News
I am still frustrated with the amount of incidental complexity required whenever I want to do this. My latest attempt was to use a Digital Ocean droplet with Django pre-installed. I guess the biggest issue there was setting up something so that I could easily deploy my local version to the droplet (ended up using git/Github), and ensuring those two environments were in sync. I looked into Docker in some detail about a year ago, and I think it's the only pretty good solution for this I've come across—but there's a steep up front cost in learning/setup etc. (or so it seems).

What services and technologies do you use when you'd like to quickly build a web app which may never be more than a prototype, but may also turn into something real? A big aspect of what I'm wondering is about automatically setting something up for keeping local/production environments in sync, quickly deploying to production, and not having to mess with a bunch of server configuration things, user accounts, security, etc.

Comments (558) 189 threads

Earlier comments
hodgesrm#
I use Swagger/OpenAPI to define the REST API, which is fast and makes the API including the main data types easily visible.

To implement the server side I typically generate Java JAX-RS skeleton code that can run in Jetty using Swagger codegen. You fill out implementation code and the app is off and running.
On the client side I generate Angular client stubs using Swagger codegen, then fill build services and UI components on top. For CLIs or other tools you can take a similar approach or just write the REST calls directly.
Code generation from an OpenAPI spec makes this process a lot quicker as it takes care of most of the boilerplate code necessary to process REST requests. It's especially helpful for making quick changes and also helps you to get to a stable, easily understandable API which is necessary if you decide to turn the service(s) into a real product.
Docker is incidentally a godsend for systems with multiple services, especially if you work in polyglot environments.

keithwhor2 replies#
If you need to build an API quickly we just launched https://code.xyz on Thursday. No server provisioning, no routing, nada, just write a JavaScript function, hit deploy, and you have a scalable "serverless" backend. You can deliver any type of content. (We have command line tools available as well, if the web environment doesn't suit all your needs.)

Our company is called StdLib, we're focused on making API development, deployment and management effortless - we're backed by both Slack and Stripe [1].
[1] https://stdlib.com/blog/stripe-code-xyz/

sandis1 reply#
That's pretty cool! Literally took me 10 seconds to sign up and deploy the sample function.
keithwhor#
Thanks! That's what we've optimized for. :) Glad you enjoyed it! Let me know if you have any questions.
repsilat#
Wow, really neat. I guess you're working on top of AWS lambda or something? If so, how do you get around the 75 gig code size limit? Just "That will be a good problem to have when we have all those customers"?
jacobsenscott1 reply#
Rails + heroku is pretty much instant. If you want to pay a little little less a single vps instance can run the web app and the postgres server at the same time.
dorfsmay2 replies#
With a single VPS, you're missing the DB backup that is probably the most important piece if the puzzle provided by heroku.
bufferoverflow4 replies#
Depends on the DB size. For small side projects I do weekly SQL dumps, 7-zip them, and email as attachments to my GMail, where they get automatically tagged and marked as read.
nmca#
This guy hacks.
balfirevic#
Don't want to be too off-topic, but I do wonder how that jibes with GDPR. I guess if they are encrypted it should be fine.
alfredallan1#
Consider using one of the command line tools to upload directly to your google drive. Have a script to do the zipping and calling the gdrive app on the zipped file, and run that as a cron job.
dorfsmay#
Whichever process you use is fine, but I wanted to highlight that there is more to heroku than just deploying your apps.
jacobsenscott#
Yes, heroku's hosted postgres is fantastic. Once you have users you should use that, or aws rds, or learn how to do it properly yourself. Until then a cron job to backup your db every week, or day or every 12 hours or whatever is good enough.
sb82441 reply#
I use Elixir/Phoenix mainly because I think it is fun and think that side projects should be fun. If it has the potential to become something more, I believe that it is a great production language for a company and would stake my business on it. Usually deploy to Heroku free tier for my up and fast prototypes.

Frontend will either be React or plain ol' JS depending on how complex the idea is.

beckler1 reply#
Coming from nodejs, phoenix is incredible. Out of the box, phoenix just uses nodejs to generate all your frontend assets, and channels are incredibly easy to use. I'm still learning about how elixir works under the covers, but so far I'm really impressed.
ai_ia3 replies#
How much learning curve if One doesn't know Erlang to get speed up in phoenix?
beckler#
You don't really need to know Erlang.

Elixir is like if Erlang and Ruby had a child. It's a functional languages, so I guess there's a bit of a curve there. Plus you get stuff like macros, which are incredible, but I thought was some kind of voodoo magic the first time I encountered them.
There's a pretty decent tutorial on the elixir site, and the phoenix site if you want to learn.
As for the learning curve, I didn't struggle with it for very long at all, but your results may vary.
https://elixir-lang.org/getting-started/introduction.html
https://hexdocs.pm/phoenix/overview.html

klibertp#
These are two separate things: Erlang and Elixir are one, Phoenix is another.

In general, you don't need to know any Erlang to start working with Elixir. In time, as you advance your knowledge and start looking at more advanced features, you'll need the ability to read Erlang at some point, but that's actually pretty trivial: Erlang syntax is one of the simplest/smallest out there. It's much better in this case than it's with Clojure and Java.
The functional nature of Elixir may be a little weird, but, if you're worried about this, it's not taken to the extreme like in Haskell. At the end of the day, you do have a process dictionary (don't use it), and normal IO. It's true for both Erlang and Elixir, but Elixir adds some improvements on top of that: in Elixir, you can re-bind a variable (Erlang has single assignment only), you get the familiar syntax for accessing elements of collections (`coll[:keyname]`), the `if` is "fixed" to be normal if-then-else (the usual Erlang construct is dubbed `cond` in Elixir) and so on. It's FP but in the spirit of OCaml rather than Haskell: pragmatic and striving to be convenient without pulling the users' minds through a monad.
Now, Phoenix is another thing altogether. As far as frameworks go, Phoenix is very well designed, with a couple of orthogonal concepts being composed into a highly functional whole. To be honest, I didn't use Phoenix yet, personally - I did some code review for colleagues, but my own projects are written with Plug for now. Plug is a library which is comparable to WSGI spec in Python plus some additional utils, like in Werkzeug. Phoenix is built on top of Plug, so I figured learning it first is not a bad idea.
Turns out you can get by with Plug (and eventually some "plugs" packages from other people) for quite a while; the experience is like with Flask or Sinatra. You have to know what you want, exactly, but if you do, it's trivial to build a basic framework out of the available plugs. It's actually a strong selling point of the whole tech: as I mentioned, Plug is as much a library as a specification (with the same motivation as WSGI) and it's great for interoperability of components. The whole stack is composable and extensible at the same time, which is not that easy to pull off as far as framework designs go.
Documentation is decent, although its searchability is less so, I had a good time with devdocs.io for the core language and with hexdocs for plugs. It's definitely grokkable, and I'd say worth a try.

sb8244#
The biggest things you'd need to know is that Erlang does exist under the covers and you'll start spotting where it peaks through.

Once deployed, the best material on running beam apps is for Erlang, as well as ops tools like recon, and so you'll start learning and using it more then.

Load more comments