12 ms·
Create a web app from scratch in under 5 minutes with Meteor and Mailgun
- karay 14y agoCongratulations Vianney! Great post. Way to represent the French Meteor community :)
- SebdL 14y agoGood job to Vianney... our French Meteor Earlyvangelist!
- acemtp 14y agoThanks
- islon 14y ago"French Meteor Evangelist" is one of the coolest titles I ever heard. Makes a great business card.
- acemtp 14y agoGood idea! Let's dok it so I'll not forget :)
- alecocq 14y agoGreat article from Vianney , easy to read, easy to understand
- deleted 14y ago[deleted]
- erkin_unlu 14y agotwo questions: is it easy to get started? is it easy to customize according to my needs in advanced later stages?
- acemtp 14y agoGet started to Meteor? I never create web app so quickly! For the customization, it depends what are your needs. Meteor is clearly cool to make collaborative web app; If it's about Mailgun, you can get started for free without any configuration and if you want to send more than 300 emails/day later, you can create a mailgun account and easily integrate your own SMTP credentials into the app using the steps outlined in the blog.
- seivan 14y agoAnyone who says "5 minutes implementation" to me, get's a nice and sound "GO FUCK YOURSELF" EDIT: Usually it's the business monkey, UX snake oil guys and product leeches that say "Hey, that will only take like 5 minutes, right?"
- fatbird 14y agoDon't "from scratch" and "with Meteor and Mailgun" contradict each other?
- alexandros 14y ago“If you wish to make an apple pie from scratch, you must first invent the universe.” ― Carl Sagan, Cosmos
- cuttooth 14y agoIt's basically the same thing as Rails people saying "you can make a blog in five minutes!", because you really can't. (This isn't a knock against Rails, it's just that five minutes barely gives you time to open the documentation and start to actually get an idea of how a library/framework is designed.)
- friendly_chap 14y ago5 minutes _once you know it_
- ehutch79 14y agoWhy is this getting downvoted so much? Just the language I hope. because there is a point there. Everytime I see a meteor post, I get the feeling the article is telling me I'd be a fool to use anything else. Assuming that's so, can we start talking about things like PCI compliant meteor apps. And what the security landscape looks like since you can interact with the data store via your browser's javascript console.
- patrickleet 14y ago
- sid6376 14y agoMeteor sounded like a really good concept and I wanted to give it a decent shot. However I could not find a getting started project. The ones I found were very trivial and did not go much into details. I couldnt really find a lot of documentation about how to create an app which used 40-50% of the features which will be used by the majority of the crowd. But I will give it another shot and probably write a polls app (ala Django getting started) in meteor.
- javajosh 14y agometeor create --list Personally, I think the `parties` example is a good one, so you can do: meteor create --example parties Enjoy.
- sid6376 14y agoThanks a lot. Checking the code now.
- 1qaz2wsx3edc 14y agoThe parties examples only uses a static map (lame), they make no use of google maps or leaflets. Try using an infoWindow. You can't, it's not easy. You're productive will be stone walled with the simplest of integration. (This is a limit of constant regions and how meteor handles controlling a piece of the dom). Working with maps or third party libraries is a common task. So, given that common tasks become stone walled and meteor promises productive. I'm waiting for 1.0, meteor is all too young. I do love some parts of the pattern. I'm surprised that it hasn't been done before; like years ago.
- javajosh 14y agoAs much as I dislike the whiny tone of your comment, you have a point: Meteor has problems integrating with some libraries. If a smart-package doesn't exist for it, the odds of it working are slim. (Try getting jquery ui to work...) Part of this is because the Meteor use of reactive programming is very different. Regarding the whining: projects like this take time and effort to create. Wanting something "a year ago" ignores the reality that this is what we have now, and for all it's warts, it's good!
- jaequery 14y agowhats the difference between mailgun and sendgrid?
- sid6376 14y agoSome links for you: http://www.quora.com/Why-are-Mailgun-and-Postmark-so-much-more-expensive-than-Sendgrid-and-AWS-SES http://www.quora.com/Why-are-Mailgun-and-Postmark-so-much-mo... http://www.sitepoint.com/email-as-a-service-part-2-sendgrid-mailgun-and-postmark/ http://www.sitepoint.com/email-as-a-service-part-2-sendgrid-...
- twakefield 14y agoFull disclosure: I am the OP and work at Mailgun This is tough for me to answer objectively, but I'll do my best. Both services offer many of the same features and eliminate the pain of managing your own email server. Both services will achieve better deliverability at scale than managing your own server unless you know what you are doing and most people aren't interested in diving that deep into email. Mailgun is very focused on serving developers and that guides our product roadmap. Therefore, we don't offer features like WYSYWIG newsletter creation tools. We build everything API first and we strive to make them RESTful, intuitive and well documented. Admittedly, our GUI / control panel is not the strongest part of the product. We also focus a lot on incoming email and we are pretty proud of our inbound email parsing through Routes. Mailgun is owned by Rackspace (acquired in Aug 2012). Sendgrid is definitely the largest transactional email sender in the market. I recently read they do something like 7 billion emails monthly. They have more tools for non-developers like newsletter creators and support language wrappers that some developers prefer. They also offer inbound through their Parse App. Sendgrid is an independent, private company that has raised $27.4mm in funding according to Crunchbase [1]. My recommendation would be to try both - the docs are all online and both offer free plans to test with. [1] http://www.crunchbase.com/company/sendgrid http://www.crunchbase.com/company/sendgrid
- pfraze 14y agoMailgun sounds like a really good fit for me. I'm running a couchdb server, and I want to set it up to POST to my DB. Dump straight into my document store, life is good. I did a quick try at it and ran into a 415 from couchdb, which means mailgun didn't send json. Is there a way to configure a route to do that? If not, I'll have to write a custom _update handler.
- nedludd 14y ago"Type this code and run it". Hey, I can teach you the theory of relativity in 30 seconds: type this "e=mc2".
- dxbydt 14y agoO'Reilly: Teach yourself xyz in 14 days... Me: But...but..how does this all work? Why? Harvard University Press: Why? That's us! Dude check us out !! The 600 page book on the top rung with no cool memes and 1980 typeface. That's us.
- bpatrianakos 14y agoYeah, I feel the sentiment. When I read this I was like "really? 5 minutes? Are we really learning anything other than how to follow instructions here?". But I'm in a bad mood so I have to admit I'm being unfair. There's a part of me that's getting a little tired of these kinds of posts because they're often disingenuous. You're really not going to learn or build anything of real use in under 5 minutes. It's definitely a cool marketing ploy for both Meteor, who get some exposure, and Mailgun who may get some new paying customers. But again, I'm being unfair. While what I said before still stands, there is the fact that I doubt anyone expects you to truly learn the framework in 5 minutes. It's just supposed to be an example of how easy it is to get started. And it works I guess. I personally have never gotten much out of the whole "X in Y time" genre of tutorials but I'm sure others do. Because I'm not new to programming I prefer to take my time and build out my own ideas as I follow these things. So while I read them I'm not actually following each step. I'm just understanding how you get from A to B, translating that to other tasks, and using pieces of the articles as I need them to suit my purposes if that makes sense.
- rfugger 14y agoPeter Norvig: Teach yourself programming in 10 years. http://norvig.com/21-days.html http://norvig.com/21-days.html
- scottmagdalein 14y agoThis isn't a "learn how to be a programmer" tutorial. This is a "look how easy Meteor makes getting something simple built and deployed". So instead of the theory of relativity, how about using a calculator to do your taxes.
- don_draper 14y agoWhy does HN not like MongoDB, but does like Meteor. Meteor uses MongoDB if you don't know.
- julien_c 14y agoDo you have reference to support the fact that HN would be biased against MongoDB?
- don_draper 14y agohttp://www.hnsearch.com/search#request/all&q=mongodb+broken http://www.hnsearch.com/search#request/all&q=mongodb+bro...
- nestlequ1k 14y agoMongoDB is pretty popular here. There's just a vocal group of old school RDBMS lovers who like to hate on everything that isn't PostgreSQL.
- papsosouid 14y agoThat doesn't seem very accurate. Plenty of "how do I shot database?" people are very anti-mongo too. Some of that may well be because they feel mongo gets more mindshare than their preferred nondb, but don't blame postgresql users for that.
- JPKab 14y agoI agree that there's a whole lot of Mongo hate on here, but it falls into two categories: 1) Teams who started with Mongo (which makes sense when your schema is still in flux and you are still feeling out what you want it to finally be) then stuck with it when they should have moved to an RDBMS due to their use case, but never did and then find out that Mongo doesn't support features that any RDBMS from the 90's would. 2) Old school RDBMS people who are, as Steve Yegge would say "software conservatives." They love the way RDBMS's force people to really put thought into their data modeling upfront, and believe that anything that allows people more flexibility is opening the door to increasing amounts of chaos. Plus they hate the thought of returning to the dark ages when databases didn't all use SQL, and everyone had to learn a new query language for a new DB. FYI: I've heard Meteor is planning on allowing use of other databases. I would particularly be keen on use of RethinkDB. I really like what those guys have been doing so far.
- eCa 14y ago> $ meteor add email > This package is automatically configured to send emails (up to 300 per day) through Mailgun I'm not sure I like having 'email' linked to a specific service. But maybe that's the Meteor way?
- patrickleet 14y agoYou can use other things, but if you want to use one instantly with zero configuration, there's this.
- ferrantim 14y agoThat's correct. Here is a quote from the meteor blog announcing this feature: " But there's more than just an API. We've partnered with Rackspace's Mailgun team so that every app deployed with $ meteor deploy can send email right away, without any annoying configuration process. These automatic accounts are capped at 200 messages a day, but of course you're not tied to them. You can use any SMTP server (your own box, a paid Mailgun account, or anything else) just by setting the $MAIL_URL environment variables, whether you're using our deploy servers or running your own bundles."
- kisielk 14y ago$ curl https://install.meteor.com https://install.meteor.com | sh I really wish people would stop giving instructions like this. Despite all the focus on web security and sandboxing, we continue to instruct people to run arbitrary code on their user account. People should at least give any shell script they download from the internet a cursory look to see if it's doing what it should be doing instead of blindly executing the response from an HTTP request.
- thisishugo 14y agoAt least it's https; I've seen sites on HN recently[1] that suggest you run code pulled over plain http, as if that wasn't an even more horrible security risk than just blindly running a script from the Internet. [1] http://chocolatey.org/ http://chocolatey.org/
- TazeTSchnitzel 14y ago@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin Goodness, that looks awful.
- orionblastar 14y agoHeh the least they could do is put that into a batch file to be downloaded and clicked on to run. Chocolatey is sort of like an alternative apt-get for Windows, except that it doesn't need s sudo command and your password to install software. It uses cinst to install stuff: cinst firefox Installs Firefox. The UAC asks the current user to allow the setup program to run and that is about it. No password needed to install like apt-get has. Oh yeah if your PC doesn't have Powershell installed you are SOL if you try to use that command to install Chocolatey. Some administrators remove it because it can be used to install software without being known to the user.
- serge2k 14y ago
- doomslice 14y agoJust curious, how does Meteor deal with concurrency issues where multiple clients are making changes to the same objects? Does last update win? How does this get reflected back to the UI? Brief example: A grocery list that both my wife and I are editing, deleting, adding, and re-arranging at the same time.
- jggonz 14y agoThey go into detail on this in their screen casts and online documentation.
- pearkes 14y agoI feel like there's a certain point where thoughtfulness trumps speed while building something. Why is there such a desire to do X in N minutes? How can something unique and truly useful come from 5 shell commands?
- gcv 14y agoWhen I want to make something unique and truly useful, I'd like to get to it. I want to waste as little time as possible on boilerplate and infrastructure.
- scottmagdalein 14y agoBecause accepting an email for a newsletter is not unique and should be able to be built in as little time as possible.
- readme 14y agoAmazon SES is similarly easy, and it works with any language over SMTP
- scribu 14y agoif(Meteor.isClient) { ... } if(Meteor.isServer) { ... } Does the Meteor compiler somehow split those code blocks into separate files, so that it only serves the client code to the browser? If not, it seems like a pretty bad practice for delivering fast webapps. Edit: In general, Meteor.isServer seems like a great way for developers to shoot themselves in the foot: Dev: Let me just add my $secret in the server-side block... Bad guy (viewing source): Oh, what have we here? Dev: PWNED :(
- javajosh 14y agoNot sure why you got downvoted; it's a good question. It's not as trivially easy to check as your downvoter might think, as deployed Meteor bundles are minified. Anyway, the answer is that the entire script is sent to the file and the server. In practice, this isn't a performance issue so much as a security issue - there may be parts of your server code that you don't want clients knowing about. You can prevent server-side code from getting shipped to the client by placing it in the server subdir.
- wavesounds 14y ago"Does the Meteor compiler somehow split those code blocks into separate files, so that it only serves the client code to the browser?" Yes.
- javajosh 14y agoUh, actually, no. And I put together a screencast to prove it. http://screencast.com/t/RkImuQ9i http://screencast.com/t/RkImuQ9i
- deleted 14y ago[deleted]
- debergalis 14y ago[meteor dev] This is on us. The docs don't make this point clearly enough. It's also the single most voted for thing on the Meteor 1.0 roadmap: https://trello.com/card/patterns-for-writing-larger-modular-apps/508721606e02bb9d570016ae/25 https://trello.com/card/patterns-for-writing-larger-modular-... JS files in the 'server' directory (or any path with a 'server' component') are not sent to the client. Everything else is. Putting code inside an `if (Meteor.isServer)` block doesn't keep it from the client. Now someday we might statically analyze the code for clauses like this and keep them out of the client bundle -- the first step is greenspan's jsparse package -- but not likely in the short term.
- orionblastar 14y agoI tried it, sent email to myself. Never received it. I typed everything correct except I replaced the email with my own email orionblastar@gmail.com there was no error messages as well. Do I have to install things like sendmail to make it work? If so that needs to be in the documentation. Yes I did the meteor add email part, I followed every step.
- sergeyo 14y agoHello, It looks like you haven't actually deployed the code. Once deployed a free Mailgun account is created for you behind the scenes and assigned to your app. To test locally you need to create a Mailgun account and follow instructions from the "Extra optional step" section. BR, Sergey
- orionblastar 14y agoThat is because I don't have a web site to deploy to yet. I wanted to test it on my Ubuntu box on Apache first before deploying. Why do I have to create an account on some other web site just so I can send email on my local Ubuntu machine?
- bjourne 14y agoGreat tutorial! If only there was an easy way to store the entered addresses in a database? Maybe that could be done in the next 5 minutes? :) I've had a few projects which where basically nothing more than just what was in the article. Meteor's builtin deploy and free Mailgun will fit perfect for cases like that.
- acemtp 14y agoOn the server, add something like: RegUsers = new Meteor.Collection("regUsers"); RegUsers.insert({email:email});
- MrBra 14y agoAren't we all scared that some time in the future from now, new kids will have new tools that will make programming a totally customizable and super-performing web application as trivial as for example dragging some component here and there, like for us has been working with new generation programming environments, compared to i.e. coding asm? This is a part of the hidden feeling I guess.. Also that then, our present efforts and knowledge will be culturally relevant but totally unnecessary for developing great new generation apps ? But...... we have what we have now, and we still code because we like it NOW, so we should accept the passing of time (and all evolutions it will bring) and think that we are still doing what we enjoy doing and that we have the luck of making a life out of it, possibly :) Only moment to be concerned about the future is when they'll invent a time machine..
- derringer 14y agoYou're likely being down voted because since the invention of programming the field has been continuously becoming "easier" often by leaps and bounds. However, programmers always remain at the edge of the boundary so there is continuously more work for programmers, not less. Every component of what made things "easy" can be improved by making it more flexible, performant etc. and doing this most believe will always require a skilled programmer. But to play devils advocate, if we were to create true artificial intelligence (I guess it would just be intelligence at that point) then not only would programmers be obsolete, but all of humanity would be obsolete. We'd all just be WALL-E style mouths to feed. This seems difficult to imagine, but we already see it happening in some ways. Unemployment is high almost everywhere and there's no fundamental economic law that every human on the planet can contribute sufficiently to match said human's consumption. Essentially what this means is we have two pretty rough options. First, all of these people fall under the welfare state. The homeless and hungry all get what they need through governments, NGOs and charities. The other is the Darwinian approach, nature's great equalizer. Both of these options suck pretty hard, but that may be the world we're looking at until our robot overlords turn us into batteries (although it's more likely we'd become pets if anything at all).
- lquist 14y agoThe great thing about Rails (and Django) was that it was born in the wild. It was built in the process of solving a real world problem, and generalized/abstracted from there. Meteor lacks that type of genesis, and I wonder if that's important.