Skip to content

Latest commit

 

History

History
75 lines (55 loc) · 2.08 KB

README.md

File metadata and controls

75 lines (55 loc) · 2.08 KB

Pony Express

ponyexprss

+-------------+      +----------------+      +-------------+
|             |      |                |      |             |
|   Dropbox   | +--> |  Pony Express  | +--> |     S3      |
|             |      |                |      |             |
+-------------+      +------|\----/|--+      +-------------+
|             |      |   ___| \,,/_/  |      |             |
| * Templates |      | +-__/       \  |      | * HTML      |
| * Styles    |      |_ +-/     ^   \ |      | * CSS       |
| * Scripts   |      |  -/   (_      \|      | * Scripts   |
| * Markdown  |      |  /      \_ / ==\      |             |
|             |      | /       / \_ O o)     |             |
+-------------+      +-------------\==/`     +-------------+

A teeny server for building & deploying static websites backed by dropbox. Your website is immediately updated when you save a file.

Recap:

  • easy editing
  • the cheapest to host
  • the fastest response times

Live Examples

Running

$ node app.js

# In production
#
$ curl -XPOST localhost:8080/deploy

# Testing
#
$ curl -XPOST localhost:3000/deploy/sync -H 'content-type: application/json' -d '{"id": 544017}'

Developing

With your /src folder already populated, you can run either of the two to push to S3 or service locally. Here [dropbox-id] is also the source folder under /src, i.e. /src/[dropbox-id]

$ node build [dropbox-id] push
$ node build [dropbox-id] dev

Registering

Run the application and visit /authorize to get dropbox keys properly installed.

In Depth

  • Dropbox hits Pony Express up any time there's a change to the app folder.
  • Pony Express fetches the files that have changed and rebuilds the website
  • Pony Express notces which build files have been changed, added, or deleted and pushes those changes to S3.
  • S3 serves up the public-facing website.

Contributing

  • Fork
  • Edit
  • Write test
  • Run tests npm test
  • PR