Medium's clapping as a full-stack service, written for When Pigs Fly — Execute Big's blog.
- Easy setup: simply setup a MongoDB connection, a Mailgun account, and a Node.js instance, and you're ready to roll.
- Email verification: Snaps are authenticated via emails, thus less spamming opportunities (is that a good thing?).
- Rate limited: Email sending is rate limited and easily configurable, so you won't run out of Mailgun credits too fast.
- No Data Racing: MongoDB comes with a number of measures including locking and other concurrency control to ensure no data racing happens.
- Make sure MongoDB is installed.
- Create a directory for the development database:
mkdir db
- Set up environment variables in
.env
(* - not required if running on Heroku)PORT
*: Port number to run it on; not required if running on HerokuHOST
: Domain that the app is being hosted on, for email link generationMONGODB_URI
*: MongoDB Connection StringSALT
: Random string, used to generate validation keysMAILGUN_KEY
: Mailgun API KeyMAILGUN_DOMAIN
: Mailgun sending domainMAILGUN_FROM
: Email address to send transactional emails from. Must be configured in Mailgun.
- Install dependencies:
yarn
- Run MongoDB instance:
yarn db
- Run development server:
yarn start
Copyright (c) 2020 Execute Big & Mingjie Jiang - Released under the MIT license.