Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

Latest commit

 

History

History
31 lines (24 loc) · 1.61 KB

README.md

File metadata and controls

31 lines (24 loc) · 1.61 KB

Snaps

Medium's clapping as a full-stack service, written for When Pigs Fly — Execute Big's blog.

Execute Pig

Features

  1. Easy setup: simply setup a MongoDB connection, a Mailgun account, and a Node.js instance, and you're ready to roll.
  2. Email verification: Snaps are authenticated via emails, thus less spamming opportunities (is that a good thing?).
  3. Rate limited: Email sending is rate limited and easily configurable, so you won't run out of Mailgun credits too fast.
  4. No Data Racing: MongoDB comes with a number of measures including locking and other concurrency control to ensure no data racing happens.

Development

  1. Make sure MongoDB is installed.
  2. Create a directory for the development database: mkdir db
  3. Set up environment variables in .env (* - not required if running on Heroku)
    • PORT*: Port number to run it on; not required if running on Heroku
    • HOST: Domain that the app is being hosted on, for email link generation
    • MONGODB_URI*: MongoDB Connection String
    • SALT: Random string, used to generate validation keys
    • MAILGUN_KEY: Mailgun API Key
    • MAILGUN_DOMAIN: Mailgun sending domain
    • MAILGUN_FROM: Email address to send transactional emails from. Must be configured in Mailgun.
  4. Install dependencies: yarn
  5. Run MongoDB instance: yarn db
  6. Run development server: yarn start

License

Copyright (c) 2020 Execute Big & Mingjie Jiang - Released under the MIT license.