Skip to content

Instantly share code, notes, and snippets.

Daniel danielgormly

  • Sydney
Block or report user

Report or block danielgormly

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
danielgormly / Dockerfile
Created Mar 5, 2018
Amazon Linux NPM Install
View Dockerfile
FROM amazonlinux
ENV NVM_DIR="/root/.nvm"
RUN curl -o- | bash \
&& [ -s "$NVM_DIR/" ] && . "$NVM_DIR/" \
&& nvm install $VERSION
ENV PATH="${NVM_DIR}/versions/node/v${VERSION}/bin:${PATH}"
WORKDIR /var/task
danielgormly / MiniKoa.js
Last active Mar 19, 2017
Microcosm of Koa's flow control
View MiniKoa.js
MiniKoa ^.^
- In the real Koa, the module Koa-composer takes on the recursive behaviour.
- This still works with async functions because await will automatically convert resolved values into promises.
- The most notable difference of course is that this doesn't respond to an http request instead it just runs instantly with whatever context object you give it.
class MiniKoa {
constructor() {
this.middleware = [];
You can’t perform that action at this time.