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
var PORT = process.env.PORT; | |
var http = require('http'); | |
var server = http.createServer(function (req, res) { | |
res.writeHead(200, {"Content-Type" : "text/plain"}); | |
res.end("hello world"); | |
}); | |
server.listen(PORT); |
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
// store the canvas image and push to local storage | |
var storeHistory = function () { | |
img = canvas.toDataURL("image/png"); | |
history.pushState({ imageData: img }, "", window.location.href); | |
if (window.localStorage) { localStorage.curImg = img; } | |
}; | |
//retrieve local storage |
NewerOlder