Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    hyperwebpublic

    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
    

    Keywords

    none

    install

    npm i hyperweb

    Downloadsweekly downloads

    14

    version

    0.0.13

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar
    • avatar