made with esnextbin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>hyperHTML Starter App</title> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script src="https://unpkg.com/hyperhtml"></script> | |
<script> | |
function tick(render) { |
made with esnextbin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hyperHTML = require('hyperhtml') | |
const component = require('hypercomponent') | |
riot = {} | |
const _riot = require('riot') | |
function toRiot (name, component, riot) { | |
riot.tag(name, '', function (opts) { | |
var tag = this | |
var instance = null | |
made with esnextbin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module['exports'] = function echoHttp (hook) { | |
console.log("Console messages are sent to /logs"); | |
console.log(hook.params); | |
console.log(hook.req.path); | |
console.log(hook.req.method); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Hello, this is a Bash script."; | |
echo "\$Hook_params_* is populated with request parameters"; | |
echo "\$Hook_params_hook:" $Hook_params_hook; | |
echo "\$Hook_params_name:" $Hook_params_owner; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function logger (hook) { | |
var setTimeout = require('timers').setTimeout | |
var url = require('url') | |
var papertrail = url.parse(hook.env.papertrail) | |
var winston = require('winston'), | |
Papertrail = require('winston-papertrail').Papertrail; | |
var logger, | |
consoleLogger = new winston.transports.Console({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module['exports'] = function saveToS3 (hook) { | |
// require the following to get access to encoder/decoder | |
// should raise an issue about this? | |
// var JPEG = require('jpg-stream') | |
var JPEGEncoder = require('jpg-stream/encoder') | |
var JPEGDecoder = require('jpg-stream/decoder') | |
var after = require('after') | |
var AWS = require('aws-sdk') | |
var bl = require('bl') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module['exports'] = function getResource (hook) { | |
var hyperquest = require('hyperquest') | |
var resource = hook.env.resource | |
hyperquest(resource, { method: 'HEAD' }, function getHeaders (err, res) { | |
if (err) { | |
return logAndEnd(err.messsage || err) | |
} | |
var post = hyperquest.post(hook.env.next, { | |
headers: { |
NewerOlder