☁ fly new
Start a new project with one of the following templates:
assembly-script
cache-for-errors
getting-started
glitch-custom-hostname
graphql-stitching
html-dom
http-cache
load-balancer
object-store
rate-limiter
static-site
watermark-image
Browse template source at https://github.com/superfly/fly/tree/master/examples
出力される雛形と同じサンプルはgithub上でも公開されている。ひとまず簡単に試して見るために $ fly new static-site して中身を少しだけ書き換えて以下の様な処理を書いてみる。
addEventListener('fetch', function (event) {let url = require('url');
let parsedUrl = url.parse(event.request.url, true);
let day = parsedUrl.query.day;
let redirectLocation = "http://hideack.hatenablog.com/";
if (day) {let backDate = newDate();
backDate.setDate(backDate.getDate() - day);
let targetDate = `archive/${backDate.getFullYear()}/${("0" + (backDate.getMonth() + 1)).slice(-2)}/${("0" + backDate.getDate()).slice(-2)}`;
redirectLocation = redirectLocation + targetDate;
}event.respondWith(new Response('Redirecting',
{
headers: {'Location': redirectLocation
},
status: 302
}
));
});
スヌーピー好きで*1Tシャツ揃えてたり仕事場に何故かぬいぐるみいたり、ピーナッツを読んだりテレビで放映されているのを見たりするのだが、とある経緯でピーナッツ中でスヌーピーの "You play with the cards your're dealt..." というセリフがあるのを初めて知って妙に共感覚えた。
日々過ごしていると仕事でもプライベートでも、自分自身の能力だったり、所有物としての何かしらの物理的なものだったりと何かが足りなかったりして悔やむことは多々あれど、いま手元にある備えているものでどう進めていくかこそが面白いと思うし、もしかしたらそれが広義の意味でのマネジメントなのかなと思った。自分のメンタルのマネジメントだったり事業上のマネジメントだったり。
最近のコメント