0.0.13 • Published 8 years ago

hyperweb v0.0.13

Weekly downloads
60
License
-
Repository
github
Last release
8 years ago

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
0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

0.0.0

9 years ago