node package manager

hyperweb

HyperWeb Helper Library (H)

This is the library that wraps all those fiddly little services that you need to create a full app.

require("hyperweb").blastOff()

get "/", ->
  "Hello World"

Sending Emails

H.email "danielx@fogcreek.com",
  subject: "Hello from HyperWeb"
  text: "ayy lmao"

Data Store

Setting and getting data is easy.

H.data.set "key", value

H.data.get("key")
.then (value) ->
  console.log value

You can also use the shorthand method

H.data "key", value

H.data "key"
.then (value) ->
  console.log value

Full Key Value Store API App Example

H = require("hyperweb")
H.blastOff()

get "/:name", (name) ->
  # Lookup the value for name from the datastore
  H.data(name)

post "/:name/", (name, data) ->
  # Set name=value in the datastore
  H.data(name, data)

Remote Resouces

H = require("hyperweb")
H.blastOff()

get "/", ->
  H.ajax("http://peopledirectorything.web/duder")
  .then (duder) ->
    duder.interests