Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including awscms with all npm packages installed. Try it out:

var awscms = require("awscms")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

awscms v0.2.6

Awscms

Say it with me: awh-s'ms

Awscms is a Connect middleware that serves Handlebars templates from an Amazon S3 bucket.

Made by Matt Brennan at import•io.

##Installing npm install awscms

##Using

The setup

app.use.apply(app, Awscms.middleware({
        prefix: '/awscms',
        access-key-id: "",
        secret-access-key: "",
        bucket: "bucket-name"
}))

page.htm

{{#extends "base"}}
{{> header}}
<ol>
    {{#each list}}
    <li>{{.}}
    {{/each}}
</ol>
{{/extends}}

page.json

{
    "list": [
        "Is amazing",
        "Will save your life"
    ]
}

header.part

<h1>Awscms</h1>

base.htm

<!doctype html>

{{{body}}}

The request

GET /awscms/page

The response

Well, what do you think?

Licence

Awscms is released under the MIT licence. ©2013 import•io

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free