The goal of this project was threefold:
To provide a simple "coming soon" landing page with an email capture form (like the old LaunchRock) that integrates with Mailchimp.
Improve the signup experience by using the Mailchimp API instead of the standard Mailchimp embed code (requires server side code to hide your API keys). We'll make an AJAX call to the API, and upon success provide a simple "thank you" message in-app (instead of a jarring redirect to a Mailchimp success page).
Host it for free.
UPDATE (Dec 2014)
Upgraded to Meteor 18.104.22.168 & added iron-router. Note: Check out the
alanning:roles package for an updated (and more secure) way to handle the isAdmin function.
- Emails submitted will also be added to a Mailchimp account (in addition to the db), using double opt-in.
- Added Twitter Bootstrap and a freely-usable placeholder design.
- Admin functionality has been removed from the main page and placed on a separate admin page, accessible only by navigating directly to /admin (e.g. localhost:3000/admin).
- Uses iron-router instead of the old meteor-router package
Hook up Mailchimp via API Add API keys via settings.json
- Security review & double check (!!!)
- Better error handling from Mailchimp API
Documentation + finish "getting started" tutorial
- Custom "thank you" landing page (after user clicks the email confirmation link)
- Move Github admin login button to a second page, accessible via an admin link on the main landing page (COMPLETED)
Note: I'm a beginner, and these instructions are intended to help other beginners get up and rolling quickly.
You need to have Node.js and Meteor installed.
I use Homebrew and found this tutorial helpful.
curl https://install.meteor.com | sh
cd into the app
meteor --settings settings.json
Open the app in your browser
Insert your Mailchimp credentials These are located in
settings.json.example. Be sure to save the new file as
settings.json(e.g. remove the "example" extension). Note: Here's how to find your API Key, and here's how to find your List ID.
Load your settings.json file
meteor --settings settings.jsonNotes: (a) Be sure meteor is not already running. (b) If you're going to deploy this to meteor's free hosting (i.e. yourappname.meteor.com), don't forget to load your settings.json file upon deploy as well:
meteor deploy yourappname --settings settings.json
Change default admin usernames Located in app.js - line 6
var ADMIN_USERS = ['someusername', 'anotherperson', 'howaboutathird'];
Enter your github username
That's it. Add your email to the form and hit submit. You should receive an email confirmation from Mailchimp if all is well.
Note: Error handling from Mailchimp responses are NOT hooked up yet, so if you test using firstname.lastname@example.org, it'll write to the db but Mailchimp will throw an error (Mailchimp doesn't like email@example.com).
This code is provided "as is" with no warranties. It'll probably break and may expose your api keys and all of your customers' email addresses. Proceed with caution.
Do with it as you wish, commercial or otherwise. If you like formal licenses: Copyright (c) 2013 Chad Kruse, released under the MIT license.
See original meteor app for licensing covering their work (github login, add email form entry to db, etc.)