Static+ builds web sites from a data stream and some HTML templates.
It can deploy the site as files in your filesystem, an S3 or CloudFront site, or from CouchDB.
Static+ allows the following work flow:
[CouchDB data] --> Static+ --+--> HTML5 files on your disk | or | +--> HTML5 attachments in CouchDB | or | +--> HTML5 files in S3/CloudFront (planned) | or | +--> HTML5 files in Dropbox (planned)
Typically Static+ deploys a site to CouchDB.
Wait, why would I round-trip from CouchDB and back?
Because Static+ turns a database full of data into a document full of attachments. That's the "plus" part.
- Fast. No shows, no lists, no views. Every request is a static download from an attachment.
- Push to a staging URL for QA, promote into production with an atomic transaction
- Every path in the site is static, simple, and fast; with two exceptions:
/_couchdbgives your site AJAX access to the CouchDB server hosting the site.
/_dbgive your site AJAX access to the database hosting the site.
Personally, I (Jason) think this is the perfect Couch app. It is very scalable. It is very fast. It is very simple. The basic web site has zero moving parts. Then I use Browser Request to access a simple, standard CouchDB API.
Install it from NPM
npm install static-plus
Static+ is flexible; however; its "beaten path" looks like this:
- You define a Handlebars template
- You define a source database. Static+ spits out (roughly) one web page per document.
- You define a target and Static+ deploys the output to there. Valid targets:
- A directory in a filesystem
- S3. Just CNAME your domain there and you're done
- CouchDB attachments, plus access to the Couch API
- Static+ watch the database
_changesfeed, updating the site when appropriate