├── .gitignore ├── 1 - Development Environment ├── README.md ├── dev-machine.yml └── images │ ├── adventure-time.png │ ├── attach-permissions.png │ ├── authorize.png │ ├── create-in-progress.png │ ├── create-keypair.png │ ├── create-stack.png │ ├── create-user.png │ ├── deployment.png │ ├── dev-machine.png │ ├── get-credentials.png │ ├── iam-home.png │ ├── localhost.png │ ├── region.png │ ├── review-stack.png │ ├── review.png │ ├── stack-output.png │ └── stack-parameters.png ├── 2 - Elastic Beanstalk ├── README.md ├── code │ ├── README.md │ ├── db.json │ ├── index.js │ ├── node_modules │ │ ├── accepts │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── any-promise │ │ │ ├── .jshintrc │ │ │ ├── .npmignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── implementation.d.ts │ │ │ ├── implementation.js │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── loader.js │ │ │ ├── optional.js │ │ │ ├── package.json │ │ │ ├── register-shim.js │ │ │ ├── register.d.ts │ │ │ ├── register.js │ │ │ └── register │ │ │ │ ├── bluebird.d.ts │ │ │ │ ├── bluebird.js │ │ │ │ ├── es6-promise.d.ts │ │ │ │ ├── es6-promise.js │ │ │ │ ├── lie.d.ts │ │ │ │ ├── lie.js │ │ │ │ ├── native-promise-only.d.ts │ │ │ │ ├── native-promise-only.js │ │ │ │ ├── pinkie.d.ts │ │ │ │ ├── pinkie.js │ │ │ │ ├── promise.d.ts │ │ │ │ ├── promise.js │ │ │ │ ├── q.d.ts │ │ │ │ ├── q.js │ │ │ │ ├── rsvp.d.ts │ │ │ │ ├── rsvp.js │ │ │ │ ├── vow.d.ts │ │ │ │ ├── vow.js │ │ │ │ ├── when.d.ts │ │ │ │ └── when.js │ │ ├── co │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── composition │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── content-disposition │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── content-type │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── cookies │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── lib │ │ │ │ └── cookies.js │ │ │ └── package.json │ │ ├── debug │ │ │ ├── .coveralls.yml │ │ │ ├── .eslintrc │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── bower.json │ │ │ ├── component.json │ │ │ ├── karma.conf.js │ │ │ ├── node.js │ │ │ ├── package.json │ │ │ └── src │ │ │ │ ├── browser.js │ │ │ │ ├── debug.js │ │ │ │ ├── index.js │ │ │ │ └── node.js │ │ ├── deep-equal │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── example │ │ │ │ └── cmp.js │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── is_arguments.js │ │ │ │ └── keys.js │ │ │ ├── package.json │ │ │ ├── readme.markdown │ │ │ └── test │ │ │ │ └── cmp.js │ │ ├── delegates │ │ │ ├── .npmignore │ │ │ ├── History.md │ │ │ ├── License │ │ │ ├── Makefile │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ └── index.js │ │ ├── depd │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── browser │ │ │ │ │ └── index.js │ │ │ │ └── compat │ │ │ │ │ ├── buffer-concat.js │ │ │ │ │ ├── callsite-tostring.js │ │ │ │ │ ├── event-listener-count.js │ │ │ │ │ └── index.js │ │ │ └── package.json │ │ ├── destroy │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── ee-first │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── error-inject │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── escape-html │ │ │ ├── LICENSE │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── fresh │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── http-assert │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ └── http-errors │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ ├── package.json │ │ │ └── readme.md │ │ ├── http-errors │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ └── inherits │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── inherits.js │ │ │ │ │ ├── inherits_browser.js │ │ │ │ │ └── package.json │ │ │ └── package.json │ │ ├── inherits │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── inherits.js │ │ │ ├── inherits_browser.js │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── isarray │ │ │ ├── README.md │ │ │ ├── build │ │ │ │ └── build.js │ │ │ ├── component.json │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── keygrip │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE.txt │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── koa-compose │ │ │ ├── History.md │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── koa-is-json │ │ │ ├── .npmignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── koa-router │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── history.md │ │ │ ├── lib │ │ │ │ ├── README_tpl.hbs │ │ │ │ ├── layer.js │ │ │ │ └── router.js │ │ │ └── package.json │ │ ├── koa │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Readme.md │ │ │ ├── lib │ │ │ │ ├── application.js │ │ │ │ ├── context.js │ │ │ │ ├── request.js │ │ │ │ └── response.js │ │ │ └── package.json │ │ ├── media-typer │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── methods │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── mime-db │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── db.json │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── mime-types │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── ms │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── negotiator │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── charset.js │ │ │ │ ├── encoding.js │ │ │ │ ├── language.js │ │ │ │ └── mediaType.js │ │ │ └── package.json │ │ ├── on-finished │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── only │ │ │ ├── .npmignore │ │ │ ├── History.md │ │ │ ├── Makefile │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── parseurl │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── path-to-regexp │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Readme.md │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── setprototypeof │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── statuses │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── codes.json │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── type-is │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ └── vary │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ ├── package.json │ └── server.js └── images │ ├── browser-json.png │ ├── configure-elastic-beanstalk.png │ ├── confirm-termination.png │ ├── create-environment.png │ ├── delete-application.png │ ├── elastic-beanstalk-architecture.png │ ├── environment-url.png │ ├── terminate-environment.png │ └── termination-events.png ├── 3 - Serverless Lambda ├── README.md ├── code │ ├── .gitignore │ ├── db.json │ ├── handler.js │ └── serverless.yml └── images │ ├── api-gateway.png │ ├── function-list.png │ ├── lambda-architecture.png │ ├── serverless-deploy.png │ └── serverless-remove.png ├── 4 - Elastic Container Service ├── README.md ├── code │ ├── recipes │ │ ├── cluster.yml │ │ └── service.yml │ └── services │ │ ├── characters │ │ ├── Dockerfile │ │ ├── db.json │ │ ├── package.json │ │ └── server.js │ │ └── locations │ │ ├── Dockerfile │ │ ├── db.json │ │ ├── package.json │ │ └── server.js └── images │ ├── cluster-outputs-listener.png │ ├── cluster-outputs-url.png │ ├── cluster.png │ ├── delete-repository.png │ ├── delete-stack.png │ ├── ecs-architecture.png │ ├── services.png │ └── tasks.png ├── 5 - AWS Fargate ├── README.md ├── code │ ├── characters │ │ ├── Dockerfile │ │ ├── db.json │ │ ├── package.json │ │ └── server.js │ └── locations │ │ ├── Dockerfile │ │ ├── db.json │ │ ├── package.json │ │ └── server.js └── images │ ├── browser-request.png │ ├── create-load-balancer.png │ ├── create-service.png │ ├── delete-repository.png │ ├── ecs-architecture.png │ ├── load-balancer-info.png │ ├── service-info.png │ └── service-scale.png ├── 6 - Kubernetes (kops) ├── README.md ├── code │ ├── recipes │ │ ├── characters.yml │ │ ├── locations.yml │ │ └── nginx.yml │ └── services │ │ ├── characters │ │ ├── Dockerfile │ │ ├── db.json │ │ ├── package.json │ │ └── server.js │ │ ├── locations │ │ ├── Dockerfile │ │ ├── db.json │ │ ├── package.json │ │ └── server.js │ │ └── nginx │ │ ├── Dockerfile │ │ └── nginx.conf └── images │ ├── create-ssh-key.png │ └── kubernetes.png ├── LICENSE ├── README.md └── diagrams └── architecture.gliffy /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .serverless 3 | -------------------------------------------------------------------------------- /1 - Development Environment/images/adventure-time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/adventure-time.png -------------------------------------------------------------------------------- /1 - Development Environment/images/attach-permissions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/attach-permissions.png -------------------------------------------------------------------------------- /1 - Development Environment/images/authorize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/authorize.png -------------------------------------------------------------------------------- /1 - Development Environment/images/create-in-progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/create-in-progress.png -------------------------------------------------------------------------------- /1 - Development Environment/images/create-keypair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/create-keypair.png -------------------------------------------------------------------------------- /1 - Development Environment/images/create-stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/create-stack.png -------------------------------------------------------------------------------- /1 - Development Environment/images/create-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/create-user.png -------------------------------------------------------------------------------- /1 - Development Environment/images/deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/deployment.png -------------------------------------------------------------------------------- /1 - Development Environment/images/dev-machine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/dev-machine.png -------------------------------------------------------------------------------- /1 - Development Environment/images/get-credentials.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/get-credentials.png -------------------------------------------------------------------------------- /1 - Development Environment/images/iam-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/iam-home.png -------------------------------------------------------------------------------- /1 - Development Environment/images/localhost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/localhost.png -------------------------------------------------------------------------------- /1 - Development Environment/images/region.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/region.png -------------------------------------------------------------------------------- /1 - Development Environment/images/review-stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/review-stack.png -------------------------------------------------------------------------------- /1 - Development Environment/images/review.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/review.png -------------------------------------------------------------------------------- /1 - Development Environment/images/stack-output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/stack-output.png -------------------------------------------------------------------------------- /1 - Development Environment/images/stack-parameters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/1 - Development Environment/images/stack-parameters.png -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/README.md: -------------------------------------------------------------------------------- 1 | ## Basic Node.js Server 2 | 3 | This is an example of a basic monolithic node.js service that has been designed to run directly on a server, without a container. 4 | 5 | ### Architecture 6 | 7 | Since Node.js programs run a single threaded event loop it is necessary to use the node `cluster` functionality in order to get maximum usage out of a multi-core server. 8 | 9 | In this example `cluster` is used to spawn one worker process per core, and the processes share a single port using round robin load balancing built into Node.js 10 | 11 | We can use a load balancer to round robin requests across multiple servers, providing horizontal scaling. 12 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "characters": [ 3 | { 4 | "id": 1, 5 | "name": "Marceline Abadeer", 6 | "gender": "female", 7 | "species": [ 8 | "human", 9 | "demon", 10 | "vampire" 11 | ], 12 | "occupations": [ 13 | "queen" 14 | ], 15 | "location": 1 16 | }, 17 | { 18 | "id": 2, 19 | "name": "Finn 'the Human' Mertens", 20 | "gender": "male", 21 | "species": [ 22 | "human" 23 | ], 24 | "occupations": [ 25 | "adventurer", 26 | "hero" 27 | ], 28 | "location": 2 29 | }, 30 | { 31 | "id": 3, 32 | "name": "Bonnibel Bubblegum", 33 | "gender": "female", 34 | "species": [ 35 | "candy elemental" 36 | ], 37 | "occupations": [ 38 | "princess", 39 | "scientist" 40 | ], 41 | "location": 3 42 | }, 43 | { 44 | "id": 4, 45 | "name": "Jake the Dog", 46 | "gender": "male", 47 | "species": [ 48 | "dog", 49 | "shape-shifter" 50 | ], 51 | "occupations": [ 52 | "criminal", 53 | "hero", 54 | "adventurer", 55 | "father" 56 | ], 57 | "location": 2 58 | }, 59 | { 60 | "id": 5, 61 | "name": "BMO", 62 | "gender": "genderless", 63 | "species": [ 64 | "mo" 65 | ], 66 | "occupations": [ 67 | "video game console", 68 | "computer", 69 | "vcr", 70 | "adventurer" 71 | ], 72 | "location": 2 73 | } 74 | ], 75 | 76 | "locations": [ 77 | { 78 | "id": 1, 79 | "name": "The Nightosphere", 80 | "description": "The demon world" 81 | }, 82 | { 83 | "id": 2, 84 | "name": "Tree Fort", 85 | "description": "Home of Finn, Jake, and BMO" 86 | }, 87 | { 88 | "id": 3, 89 | "name": "Candy Kingdom", 90 | "description": "Kingdom made up of and populated by candy people" 91 | } 92 | ] 93 | } 94 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/index.js: -------------------------------------------------------------------------------- 1 | const cluster = require('cluster'); 2 | const http = require('http'); 3 | const numCPUs = require('os').cpus().length; 4 | 5 | if (cluster.isMaster) { 6 | console.log(`Leader ${process.pid} is running`); 7 | 8 | // Fork workers. 9 | for (let i = 0; i < numCPUs; i++) { 10 | cluster.fork(); 11 | } 12 | 13 | cluster.on('exit', (worker, code, signal) => { 14 | console.log(`worker ${worker.process.pid} died`); 15 | }); 16 | } else { 17 | require('./server.js'); 18 | 19 | console.log(`Worker ${process.pid} started`); 20 | } 21 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/accepts/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Jonathan Ong 4 | Copyright (c) 2015 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node":true, 3 | "strict":true 4 | } 5 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/.npmignore: -------------------------------------------------------------------------------- 1 | .git* 2 | test/ 3 | test-browser/ 4 | build/ 5 | .travis.yml 6 | *.swp 7 | Makefile 8 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014-2016 Kevin Beaty 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/implementation.d.ts: -------------------------------------------------------------------------------- 1 | declare var implementation: string; 2 | 3 | export = implementation; 4 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/implementation.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./register')().implementation 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./register')().Promise 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/optional.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | try { 3 | module.exports = require('./register')().Promise || null 4 | } catch(e) { 5 | module.exports = null 6 | } 7 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register-shim.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | module.exports = require('./loader')(window, loadImplementation) 3 | 4 | /** 5 | * Browser specific loadImplementation. Always uses `window.Promise` 6 | * 7 | * To register a custom implementation, must register with `Promise` option. 8 | */ 9 | function loadImplementation(){ 10 | if(typeof window.Promise === 'undefined'){ 11 | throw new Error("any-promise browser requires a polyfill or explicit registration"+ 12 | " e.g: require('any-promise/register/bluebird')") 13 | } 14 | return { 15 | Promise: window.Promise, 16 | implementation: 'window.Promise' 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register.d.ts: -------------------------------------------------------------------------------- 1 | import Promise = require('./index'); 2 | 3 | declare function register (module?: string, options?: register.Options): register.Register; 4 | 5 | declare namespace register { 6 | export interface Register { 7 | Promise: typeof Promise; 8 | implementation: string; 9 | } 10 | 11 | export interface Options { 12 | Promise?: typeof Promise; 13 | global?: boolean 14 | } 15 | } 16 | 17 | export = register; 18 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/bluebird.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/bluebird.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('bluebird', {Promise: require('bluebird')}) 3 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/es6-promise.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/es6-promise.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('es6-promise', {Promise: require('es6-promise').Promise}) 3 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/lie.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/lie.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('lie', {Promise: require('lie')}) 3 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/native-promise-only.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/native-promise-only.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('native-promise-only', {Promise: require('native-promise-only')}) 3 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/pinkie.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/pinkie.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('pinkie', {Promise: require('pinkie')}) 3 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/promise.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/promise.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('promise', {Promise: require('promise')}) 3 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/q.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/q.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('q', {Promise: require('q').Promise}) 3 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/rsvp.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/rsvp.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('rsvp', {Promise: require('rsvp').Promise}) 3 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/vow.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/vow.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('vow', {Promise: require('vow').Promise}) 3 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/when.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/any-promise/register/when.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../register')('when', {Promise: require('when').Promise}) 3 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/co/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca> 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/composition/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/composition/README.md: -------------------------------------------------------------------------------- 1 | 2 | # composition 3 | 4 | [![NPM version][npm-image]][npm-url] 5 | [![Build status][travis-image]][travis-url] 6 | [![Test coverage][coveralls-image]][coveralls-url] 7 | [![Dependency Status][david-image]][david-url] 8 | [![License][license-image]][license-url] 9 | [![Downloads][downloads-image]][downloads-url] 10 | 11 | Compose generator and async/await middleware like koa. 12 | Allows to use both generator functions and async/await functions. 13 | 14 | ```js 15 | var compose = require('composition'); 16 | 17 | var stack = []; 18 | 19 | // generator functions 20 | stack.push(function* (next) { 21 | yield next; 22 | }); 23 | 24 | // regular functions that return anything 25 | // but they should be promises! 26 | stack.push(function (next) { 27 | return Promise.resolve(true); 28 | }); 29 | 30 | // async/await functions 31 | stack.push(async function (next) { 32 | return await Promise.resolve(true); 33 | }); 34 | 35 | // compose it into a function 36 | var fn = compose(stack); 37 | 38 | // this function returns a promise 39 | fn.call(this).then(function (val) { 40 | console.log(val); 41 | }).catch(function (err) { 42 | console.error(err.stack); 43 | process.exit(1); 44 | }) 45 | ``` 46 | 47 | [gitter-image]: https://badges.gitter.im/thenables/composition.png 48 | [gitter-url]: https://gitter.im/thenables/composition 49 | [npm-image]: https://img.shields.io/npm/v/composition.svg?style=flat-square 50 | [npm-url]: https://npmjs.org/package/composition 51 | [github-tag]: http://img.shields.io/github/tag/thenables/composition.svg?style=flat-square 52 | [github-url]: https://github.com/thenables/composition/tags 53 | [travis-image]: https://img.shields.io/travis/thenables/composition.svg?style=flat-square 54 | [travis-url]: https://travis-ci.org/thenables/composition 55 | [coveralls-image]: https://img.shields.io/coveralls/thenables/composition.svg?style=flat-square 56 | [coveralls-url]: https://coveralls.io/r/thenables/composition 57 | [david-image]: http://img.shields.io/david/thenables/composition.svg?style=flat-square 58 | [david-url]: https://david-dm.org/thenables/composition 59 | [license-image]: http://img.shields.io/npm/l/composition.svg?style=flat-square 60 | [license-url]: LICENSE 61 | [downloads-image]: http://img.shields.io/npm/dm/composition.svg?style=flat-square 62 | [downloads-url]: https://npmjs.org/package/composition 63 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/content-disposition/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.5.2 / 2016-12-08 2 | ================== 3 | 4 | * Fix `parse` to accept any linear whitespace character 5 | 6 | 0.5.1 / 2016-01-17 7 | ================== 8 | 9 | * perf: enable strict mode 10 | 11 | 0.5.0 / 2014-10-11 12 | ================== 13 | 14 | * Add `parse` function 15 | 16 | 0.4.0 / 2014-09-21 17 | ================== 18 | 19 | * Expand non-Unicode `filename` to the full ISO-8859-1 charset 20 | 21 | 0.3.0 / 2014-09-20 22 | ================== 23 | 24 | * Add `fallback` option 25 | * Add `type` option 26 | 27 | 0.2.0 / 2014-09-19 28 | ================== 29 | 30 | * Reduce ambiguity of file names with hex escape in buggy browsers 31 | 32 | 0.1.2 / 2014-09-19 33 | ================== 34 | 35 | * Fix periodic invalid Unicode filename header 36 | 37 | 0.1.1 / 2014-09-19 38 | ================== 39 | 40 | * Fix invalid characters appearing in `filename*` parameter 41 | 42 | 0.1.0 / 2014-09-18 43 | ================== 44 | 45 | * Make the `filename` argument optional 46 | 47 | 0.0.0 / 2014-09-18 48 | ================== 49 | 50 | * Initial release 51 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/content-disposition/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/content-type/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.2 / 2016-05-09 2 | ================== 3 | 4 | * perf: enable strict mode 5 | 6 | 1.0.1 / 2015-02-13 7 | ================== 8 | 9 | * Improve missing `Content-Type` header error message 10 | 11 | 1.0.0 / 2015-02-01 12 | ================== 13 | 14 | * Initial implementation, derived from `media-typer@0.3.0` 15 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/content-type/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2015 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/cookies/History.md: -------------------------------------------------------------------------------- 1 | 0.6.2 / 2016-11-12 2 | ================== 3 | 4 | * Fix `keys` deprecation message 5 | * deps: keygrip@~1.0.1 6 | 7 | 0.6.1 / 2016-02-29 8 | ================== 9 | 10 | * Fix regression in 0.6.0 for array of strings in `keys` option 11 | 12 | 0.6.0 / 2016-02-29 13 | ================== 14 | 15 | * Add `secure` constructor option for secure connection checking 16 | * Change constructor to signature `new Cookies(req, res, [options])` 17 | - Replace `new Cookies(req, res, key)` with `new Cookies(req, res, {'keys': keys})` 18 | * Change prototype construction for proper "constructor" property 19 | * Deprecate `secureProxy` option in `.set`; use `secure` option instead 20 | - If `secure: true` throws even over SSL, use the `secure` constructor option 21 | 22 | 0.5.1 / 2014-07-27 23 | ================== 24 | 25 | * Throw on invalid values provided to `Cookie` constructor 26 | - This is not strict validation, but basic RFC 7230 validation 27 | 28 | 0.5.0 / 2014-07-27 29 | ================== 30 | 31 | * Integrate with `req.protocol` for secure cookies 32 | * Support `maxAge` as well as `maxage` 33 | 34 | 0.4.1 / 2014-05-07 35 | ================== 36 | 37 | * Update package for repo move 38 | 39 | 0.4.0 / 2014-01-31 40 | ================== 41 | 42 | * Allow passing an array of strings as keys 43 | 44 | 0.3.8-0.2.0 45 | =========== 46 | 47 | * TODO: write down history for these releases 48 | 49 | 0.1.6 / 2011-03-01 50 | ================== 51 | 52 | * SSL cookies secure by default 53 | * Use httpOnly by default unless explicitly false 54 | 55 | 0.1.5 / 2011-02-26 56 | ================== 57 | 58 | * Delete sig cookie if signed cookie is deleted 59 | 60 | 0.1.4 / 2011-02-26 61 | ================== 62 | 63 | * Always set path 64 | 65 | 0.1.3 / 2011-02-26 66 | ================== 67 | 68 | * Add sensible defaults for path 69 | 70 | 0.1.2 / 2011-02-26 71 | ================== 72 | 73 | * Inherit cookie properties to signature cookie 74 | 75 | 0.1.1 / 2011-02-25 76 | ================== 77 | 78 | * Readme updates 79 | 80 | 0.1.0 / 2011-02-25 81 | ================== 82 | 83 | * Initial release 84 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/cookies/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Jed Schmidt, http://jed.is/ 4 | Copyright (c) 2015-2016 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/debug/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/debug/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": 0, 8 | "no-empty": [1, { "allowEmptyCatch": true }] 9 | }, 10 | "extends": "eslint:recommended" 11 | } 12 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | yarn.lock 8 | coverage 9 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/debug/.travis.yml: -------------------------------------------------------------------------------- 1 | 2 | language: node_js 3 | node_js: 4 | - "6" 5 | - "5" 6 | - "4" 7 | 8 | install: 9 | - make node_modules 10 | 11 | script: 12 | - make lint 13 | - make test 14 | - make coveralls 15 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/debug/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | and associated documentation files (the 'Software'), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/debug/Makefile: -------------------------------------------------------------------------------- 1 | # get Makefile directory name: http://stackoverflow.com/a/5982798/376773 2 | THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) 3 | THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) 4 | 5 | # BIN directory 6 | BIN := $(THIS_DIR)/node_modules/.bin 7 | 8 | # Path 9 | PATH := node_modules/.bin:$(PATH) 10 | SHELL := /bin/bash 11 | 12 | # applications 13 | NODE ?= $(shell which node) 14 | YARN ?= $(shell which yarn) 15 | PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) 16 | BROWSERIFY ?= $(NODE) $(BIN)/browserify 17 | 18 | .FORCE: 19 | 20 | install: node_modules 21 | 22 | node_modules: package.json 23 | @NODE_ENV= $(PKG) install 24 | @touch node_modules 25 | 26 | lint: .FORCE 27 | eslint browser.js debug.js index.js node.js 28 | 29 | test-node: .FORCE 30 | istanbul cover node_modules/mocha/bin/_mocha -- test/**.js 31 | 32 | test-browser: .FORCE 33 | mkdir -p dist 34 | 35 | @$(BROWSERIFY) \ 36 | --standalone debug \ 37 | . > dist/debug.js 38 | 39 | karma start --single-run 40 | rimraf dist 41 | 42 | test: .FORCE 43 | concurrently \ 44 | "make test-node" \ 45 | "make test-browser" 46 | 47 | coveralls: 48 | cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js 49 | 50 | .PHONY: all install clean distclean 51 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/debug/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "visionmedia-debug", 3 | "main": "./src/browser.js", 4 | "homepage": "https://github.com/visionmedia/debug", 5 | "authors": [ 6 | "TJ Holowaychuk ", 7 | "Nathan Rajlich (http://n8.io)", 8 | "Andrew Rhyne " 9 | ], 10 | "description": "visionmedia-debug", 11 | "moduleType": [ 12 | "amd", 13 | "es6", 14 | "globals", 15 | "node" 16 | ], 17 | "keywords": [ 18 | "visionmedia", 19 | "debug" 20 | ], 21 | "license": "MIT", 22 | "ignore": [ 23 | "**/.*", 24 | "node_modules", 25 | "bower_components", 26 | "test", 27 | "tests" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/debug/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "repo": "visionmedia/debug", 4 | "description": "small debugging utility", 5 | "version": "2.6.1", 6 | "keywords": [ 7 | "debug", 8 | "log", 9 | "debugger" 10 | ], 11 | "main": "src/browser.js", 12 | "scripts": [ 13 | "src/browser.js", 14 | "src/debug.js" 15 | ], 16 | "dependencies": { 17 | "rauchg/ms.js": "0.7.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/debug/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['mocha', 'chai', 'sinon'], 14 | 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'dist/debug.js', 19 | 'test/*spec.js' 20 | ], 21 | 22 | 23 | // list of files to exclude 24 | exclude: [ 25 | 'src/node.js' 26 | ], 27 | 28 | 29 | // preprocess matching files before serving them to the browser 30 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 31 | preprocessors: { 32 | }, 33 | 34 | // test results reporter to use 35 | // possible values: 'dots', 'progress' 36 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 37 | reporters: ['progress'], 38 | 39 | 40 | // web server port 41 | port: 9876, 42 | 43 | 44 | // enable / disable colors in the output (reporters and logs) 45 | colors: true, 46 | 47 | 48 | // level of logging 49 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 50 | logLevel: config.LOG_INFO, 51 | 52 | 53 | // enable / disable watching file and executing tests whenever any file changes 54 | autoWatch: true, 55 | 56 | 57 | // start these browsers 58 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 59 | browsers: ['PhantomJS'], 60 | 61 | 62 | // Continuous Integration mode 63 | // if true, Karma captures browsers, runs the tests and exits 64 | singleRun: false, 65 | 66 | // Concurrency level 67 | // how many browser should be started simultaneous 68 | concurrency: Infinity 69 | }) 70 | } 71 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/debug/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Detect Electron renderer process, which is node, but we should 3 | * treat as a browser. 4 | */ 5 | 6 | if (typeof process !== 'undefined' && process.type === 'renderer') { 7 | module.exports = require('./browser.js'); 8 | } else { 9 | module.exports = require('./node.js'); 10 | } 11 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/deep-equal/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '0.8' 4 | - '0.10' 5 | - '0.12' 6 | - 'iojs' 7 | before_install: 8 | - npm install -g npm@latest 9 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/deep-equal/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/deep-equal/example/cmp.js: -------------------------------------------------------------------------------- 1 | var equal = require('../'); 2 | console.dir([ 3 | equal( 4 | { a : [ 2, 3 ], b : [ 4 ] }, 5 | { a : [ 2, 3 ], b : [ 4 ] } 6 | ), 7 | equal( 8 | { x : 5, y : [6] }, 9 | { x : 5, y : 6 } 10 | ) 11 | ]); 12 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/deep-equal/lib/is_arguments.js: -------------------------------------------------------------------------------- 1 | var supportsArgumentsClass = (function(){ 2 | return Object.prototype.toString.call(arguments) 3 | })() == '[object Arguments]'; 4 | 5 | exports = module.exports = supportsArgumentsClass ? supported : unsupported; 6 | 7 | exports.supported = supported; 8 | function supported(object) { 9 | return Object.prototype.toString.call(object) == '[object Arguments]'; 10 | }; 11 | 12 | exports.unsupported = unsupported; 13 | function unsupported(object){ 14 | return object && 15 | typeof object == 'object' && 16 | typeof object.length == 'number' && 17 | Object.prototype.hasOwnProperty.call(object, 'callee') && 18 | !Object.prototype.propertyIsEnumerable.call(object, 'callee') || 19 | false; 20 | }; 21 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/deep-equal/lib/keys.js: -------------------------------------------------------------------------------- 1 | exports = module.exports = typeof Object.keys === 'function' 2 | ? Object.keys : shim; 3 | 4 | exports.shim = shim; 5 | function shim (obj) { 6 | var keys = []; 7 | for (var key in obj) keys.push(key); 8 | return keys; 9 | } 10 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/deep-equal/readme.markdown: -------------------------------------------------------------------------------- 1 | # deep-equal 2 | 3 | Node's `assert.deepEqual() algorithm` as a standalone module. 4 | 5 | This module is around [5 times faster](https://gist.github.com/2790507) 6 | than wrapping `assert.deepEqual()` in a `try/catch`. 7 | 8 | [![browser support](https://ci.testling.com/substack/node-deep-equal.png)](https://ci.testling.com/substack/node-deep-equal) 9 | 10 | [![build status](https://secure.travis-ci.org/substack/node-deep-equal.png)](https://travis-ci.org/substack/node-deep-equal) 11 | 12 | # example 13 | 14 | ``` js 15 | var equal = require('deep-equal'); 16 | console.dir([ 17 | equal( 18 | { a : [ 2, 3 ], b : [ 4 ] }, 19 | { a : [ 2, 3 ], b : [ 4 ] } 20 | ), 21 | equal( 22 | { x : 5, y : [6] }, 23 | { x : 5, y : 6 } 24 | ) 25 | ]); 26 | ``` 27 | 28 | # methods 29 | 30 | ``` js 31 | var deepEqual = require('deep-equal') 32 | ``` 33 | 34 | ## deepEqual(a, b, opts) 35 | 36 | Compare objects `a` and `b`, returning whether they are equal according to a 37 | recursive equality algorithm. 38 | 39 | If `opts.strict` is `true`, use strict equality (`===`) to compare leaf nodes. 40 | The default is to use coercive equality (`==`) because that's how 41 | `assert.deepEqual()` works by default. 42 | 43 | # install 44 | 45 | With [npm](http://npmjs.org) do: 46 | 47 | ``` 48 | npm install deep-equal 49 | ``` 50 | 51 | # test 52 | 53 | With [npm](http://npmjs.org) do: 54 | 55 | ``` 56 | npm test 57 | ``` 58 | 59 | # license 60 | 61 | MIT. Derived largely from node's assert module. 62 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/deep-equal/test/cmp.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var equal = require('../'); 3 | var isArguments = require('../lib/is_arguments.js'); 4 | var objectKeys = require('../lib/keys.js'); 5 | 6 | test('equal', function (t) { 7 | t.ok(equal( 8 | { a : [ 2, 3 ], b : [ 4 ] }, 9 | { a : [ 2, 3 ], b : [ 4 ] } 10 | )); 11 | t.end(); 12 | }); 13 | 14 | test('not equal', function (t) { 15 | t.notOk(equal( 16 | { x : 5, y : [6] }, 17 | { x : 5, y : 6 } 18 | )); 19 | t.end(); 20 | }); 21 | 22 | test('nested nulls', function (t) { 23 | t.ok(equal([ null, null, null ], [ null, null, null ])); 24 | t.end(); 25 | }); 26 | 27 | test('strict equal', function (t) { 28 | t.notOk(equal( 29 | [ { a: 3 }, { b: 4 } ], 30 | [ { a: '3' }, { b: '4' } ], 31 | { strict: true } 32 | )); 33 | t.end(); 34 | }); 35 | 36 | test('non-objects', function (t) { 37 | t.ok(equal(3, 3)); 38 | t.ok(equal('beep', 'beep')); 39 | t.ok(equal('3', 3)); 40 | t.notOk(equal('3', 3, { strict: true })); 41 | t.notOk(equal('3', [3])); 42 | t.end(); 43 | }); 44 | 45 | test('arguments class', function (t) { 46 | t.ok(equal( 47 | (function(){return arguments})(1,2,3), 48 | (function(){return arguments})(1,2,3), 49 | "compares arguments" 50 | )); 51 | t.notOk(equal( 52 | (function(){return arguments})(1,2,3), 53 | [1,2,3], 54 | "differenciates array and arguments" 55 | )); 56 | t.end(); 57 | }); 58 | 59 | test('test the arguments shim', function (t) { 60 | t.ok(isArguments.supported((function(){return arguments})())); 61 | t.notOk(isArguments.supported([1,2,3])); 62 | 63 | t.ok(isArguments.unsupported((function(){return arguments})())); 64 | t.notOk(isArguments.unsupported([1,2,3])); 65 | 66 | t.end(); 67 | }); 68 | 69 | test('test the keys shim', function (t) { 70 | t.deepEqual(objectKeys.shim({ a: 1, b : 2 }), [ 'a', 'b' ]); 71 | t.end(); 72 | }); 73 | 74 | test('dates', function (t) { 75 | var d0 = new Date(1387585278000); 76 | var d1 = new Date('Fri Dec 20 2013 16:21:18 GMT-0800 (PST)'); 77 | t.ok(equal(d0, d1)); 78 | t.end(); 79 | }); 80 | 81 | test('buffers', function (t) { 82 | t.ok(equal(Buffer('xyz'), Buffer('xyz'))); 83 | t.end(); 84 | }); 85 | 86 | test('booleans and arrays', function (t) { 87 | t.notOk(equal(true, [])); 88 | t.end(); 89 | }) 90 | 91 | test('null == undefined', function (t) { 92 | t.ok(equal(null, undefined)) 93 | t.notOk(equal(null, undefined, { strict: true })) 94 | t.end() 95 | }) 96 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/delegates/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/delegates/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.0 / 2015-12-14 3 | ================== 4 | 5 | * Merge pull request #12 from kasicka/master 6 | * Add license text 7 | 8 | 0.1.0 / 2014-10-17 9 | ================== 10 | 11 | * adds `.fluent()` to api 12 | 13 | 0.0.3 / 2014-01-13 14 | ================== 15 | 16 | * fix receiver for .method() 17 | 18 | 0.0.2 / 2014-01-13 19 | ================== 20 | 21 | * Object.defineProperty() sucks 22 | * Initial commit 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/delegates/License: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 TJ Holowaychuk 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/delegates/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --require should \ 5 | --reporter spec \ 6 | --bail 7 | 8 | .PHONY: test -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/delegates/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | # delegates 3 | 4 | Node method and accessor delegation utilty. 5 | 6 | ## Installation 7 | 8 | ``` 9 | $ npm install delegates 10 | ``` 11 | 12 | ## Example 13 | 14 | ```js 15 | var delegate = require('delegates'); 16 | 17 | ... 18 | 19 | delegate(proto, 'request') 20 | .method('acceptsLanguages') 21 | .method('acceptsEncodings') 22 | .method('acceptsCharsets') 23 | .method('accepts') 24 | .method('is') 25 | .access('querystring') 26 | .access('idempotent') 27 | .access('socket') 28 | .access('length') 29 | .access('query') 30 | .access('search') 31 | .access('status') 32 | .access('method') 33 | .access('path') 34 | .access('body') 35 | .access('host') 36 | .access('url') 37 | .getter('subdomains') 38 | .getter('protocol') 39 | .getter('header') 40 | .getter('stale') 41 | .getter('fresh') 42 | .getter('secure') 43 | .getter('ips') 44 | .getter('ip') 45 | ``` 46 | 47 | # API 48 | 49 | ## Delegate(proto, prop) 50 | 51 | Creates a delegator instance used to configure using the `prop` on the given 52 | `proto` object. (which is usually a prototype) 53 | 54 | ## Delegate#method(name) 55 | 56 | Allows the given method `name` to be accessed on the host. 57 | 58 | ## Delegate#getter(name) 59 | 60 | Creates a "getter" for the property with the given `name` on the delegated 61 | object. 62 | 63 | ## Delegate#setter(name) 64 | 65 | Creates a "setter" for the property with the given `name` on the delegated 66 | object. 67 | 68 | ## Delegate#access(name) 69 | 70 | Creates an "accessor" (ie: both getter *and* setter) for the property with the 71 | given `name` on the delegated object. 72 | 73 | ## Delegate#fluent(name) 74 | 75 | A unique type of "accessor" that works for a "fluent" API. When called as a 76 | getter, the method returns the expected value. However, if the method is called 77 | with a value, it will return itself so it can be chained. For example: 78 | 79 | ```js 80 | delegate(proto, 'request') 81 | .fluent('query') 82 | 83 | // getter 84 | var q = request.query(); 85 | 86 | // setter (chainable) 87 | request 88 | .query({ a: 1 }) 89 | .query({ b: 2 }); 90 | ``` 91 | 92 | # License 93 | 94 | MIT 95 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/delegates/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "delegates@^1.0.0", 6 | "scope": null, 7 | "escapedName": "delegates", 8 | "name": "delegates", 9 | "rawSpec": "^1.0.0", 10 | "spec": ">=1.0.0 <2.0.0", 11 | "type": "range" 12 | }, 13 | "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/koa" 14 | ] 15 | ], 16 | "_from": "delegates@>=1.0.0 <2.0.0", 17 | "_id": "delegates@1.0.0", 18 | "_inCache": true, 19 | "_location": "/delegates", 20 | "_nodeVersion": "4.2.1", 21 | "_npmUser": { 22 | "name": "tjholowaychuk", 23 | "email": "tj@vision-media.ca" 24 | }, 25 | "_npmVersion": "3.3.12", 26 | "_phantomChildren": {}, 27 | "_requested": { 28 | "raw": "delegates@^1.0.0", 29 | "scope": null, 30 | "escapedName": "delegates", 31 | "name": "delegates", 32 | "rawSpec": "^1.0.0", 33 | "spec": ">=1.0.0 <2.0.0", 34 | "type": "range" 35 | }, 36 | "_requiredBy": [ 37 | "/koa" 38 | ], 39 | "_resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", 40 | "_shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a", 41 | "_shrinkwrap": null, 42 | "_spec": "delegates@^1.0.0", 43 | "_where": "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/koa", 44 | "bugs": { 45 | "url": "https://github.com/visionmedia/node-delegates/issues" 46 | }, 47 | "dependencies": {}, 48 | "description": "delegate methods and accessors to another property", 49 | "devDependencies": { 50 | "mocha": "*", 51 | "should": "*" 52 | }, 53 | "directories": {}, 54 | "dist": { 55 | "shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a", 56 | "tarball": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" 57 | }, 58 | "gitHead": "c4dc07ef1ed51c2b2a63f3585e5ef949ee577a49", 59 | "homepage": "https://github.com/visionmedia/node-delegates#readme", 60 | "keywords": [ 61 | "delegate", 62 | "delegation" 63 | ], 64 | "license": "MIT", 65 | "maintainers": [ 66 | { 67 | "name": "tjholowaychuk", 68 | "email": "tj@vision-media.ca" 69 | }, 70 | { 71 | "name": "dominicbarnes", 72 | "email": "dominic@dbarnes.info" 73 | } 74 | ], 75 | "name": "delegates", 76 | "optionalDependencies": {}, 77 | "readme": "ERROR: No README data found!", 78 | "repository": { 79 | "type": "git", 80 | "url": "git+https://github.com/visionmedia/node-delegates.git" 81 | }, 82 | "scripts": {}, 83 | "version": "1.0.0" 84 | } 85 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/delegates/test/index.js: -------------------------------------------------------------------------------- 1 | 2 | var assert = require('assert'); 3 | var delegate = require('..'); 4 | 5 | describe('.method(name)', function(){ 6 | it('should delegate methods', function(){ 7 | var obj = {}; 8 | 9 | obj.request = { 10 | foo: function(bar){ 11 | assert(this == obj.request); 12 | return bar; 13 | } 14 | }; 15 | 16 | delegate(obj, 'request').method('foo'); 17 | 18 | obj.foo('something').should.equal('something'); 19 | }) 20 | }) 21 | 22 | describe('.getter(name)', function(){ 23 | it('should delegate getters', function(){ 24 | var obj = {}; 25 | 26 | obj.request = { 27 | get type() { 28 | return 'text/html'; 29 | } 30 | } 31 | 32 | delegate(obj, 'request').getter('type'); 33 | 34 | obj.type.should.equal('text/html'); 35 | }) 36 | }) 37 | 38 | describe('.setter(name)', function(){ 39 | it('should delegate setters', function(){ 40 | var obj = {}; 41 | 42 | obj.request = { 43 | get type() { 44 | return this._type.toUpperCase(); 45 | }, 46 | 47 | set type(val) { 48 | this._type = val; 49 | } 50 | } 51 | 52 | delegate(obj, 'request').setter('type'); 53 | 54 | obj.type = 'hey'; 55 | obj.request.type.should.equal('HEY'); 56 | }) 57 | }) 58 | 59 | describe('.access(name)', function(){ 60 | it('should delegate getters and setters', function(){ 61 | var obj = {}; 62 | 63 | obj.request = { 64 | get type() { 65 | return this._type.toUpperCase(); 66 | }, 67 | 68 | set type(val) { 69 | this._type = val; 70 | } 71 | } 72 | 73 | delegate(obj, 'request').access('type'); 74 | 75 | obj.type = 'hey'; 76 | obj.type.should.equal('HEY'); 77 | }) 78 | }) 79 | 80 | describe('.fluent(name)', function () { 81 | it('should delegate in a fluent fashion', function () { 82 | var obj = { 83 | settings: { 84 | env: 'development' 85 | } 86 | }; 87 | 88 | delegate(obj, 'settings').fluent('env'); 89 | 90 | obj.env().should.equal('development'); 91 | obj.env('production').should.equal(obj); 92 | obj.settings.env.should.equal('production'); 93 | }) 94 | }) 95 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/depd/History.md: -------------------------------------------------------------------------------- 1 | 1.1.0 / 2015-09-14 2 | ================== 3 | 4 | * Enable strict mode in more places 5 | * Support io.js 3.x 6 | * Support io.js 2.x 7 | * Support web browser loading 8 | - Requires bundler like Browserify or webpack 9 | 10 | 1.0.1 / 2015-04-07 11 | ================== 12 | 13 | * Fix `TypeError`s when under `'use strict'` code 14 | * Fix useless type name on auto-generated messages 15 | * Support io.js 1.x 16 | * Support Node.js 0.12 17 | 18 | 1.0.0 / 2014-09-17 19 | ================== 20 | 21 | * No changes 22 | 23 | 0.4.5 / 2014-09-09 24 | ================== 25 | 26 | * Improve call speed to functions using the function wrapper 27 | * Support Node.js 0.6 28 | 29 | 0.4.4 / 2014-07-27 30 | ================== 31 | 32 | * Work-around v8 generating empty stack traces 33 | 34 | 0.4.3 / 2014-07-26 35 | ================== 36 | 37 | * Fix exception when global `Error.stackTraceLimit` is too low 38 | 39 | 0.4.2 / 2014-07-19 40 | ================== 41 | 42 | * Correct call site for wrapped functions and properties 43 | 44 | 0.4.1 / 2014-07-19 45 | ================== 46 | 47 | * Improve automatic message generation for function properties 48 | 49 | 0.4.0 / 2014-07-19 50 | ================== 51 | 52 | * Add `TRACE_DEPRECATION` environment variable 53 | * Remove non-standard grey color from color output 54 | * Support `--no-deprecation` argument 55 | * Support `--trace-deprecation` argument 56 | * Support `deprecate.property(fn, prop, message)` 57 | 58 | 0.3.0 / 2014-06-16 59 | ================== 60 | 61 | * Add `NO_DEPRECATION` environment variable 62 | 63 | 0.2.0 / 2014-06-15 64 | ================== 65 | 66 | * Add `deprecate.property(obj, prop, message)` 67 | * Remove `supports-color` dependency for node.js 0.8 68 | 69 | 0.1.0 / 2014-06-15 70 | ================== 71 | 72 | * Add `deprecate.function(fn, message)` 73 | * Add `process.on('deprecation', fn)` emitter 74 | * Automatically generate message when omitted from `deprecate()` 75 | 76 | 0.0.1 / 2014-06-15 77 | ================== 78 | 79 | * Fix warning for dynamic calls at singe call site 80 | 81 | 0.0.0 / 2014-06-15 82 | ================== 83 | 84 | * Initial implementation 85 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/depd/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014-2015 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/depd/lib/browser/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2015 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = depd 15 | 16 | /** 17 | * Create deprecate for namespace in caller. 18 | */ 19 | 20 | function depd(namespace) { 21 | if (!namespace) { 22 | throw new TypeError('argument namespace is required') 23 | } 24 | 25 | function deprecate(message) { 26 | // no-op in browser 27 | } 28 | 29 | deprecate._file = undefined 30 | deprecate._ignored = true 31 | deprecate._namespace = namespace 32 | deprecate._traced = false 33 | deprecate._warned = Object.create(null) 34 | 35 | deprecate.function = wrapfunction 36 | deprecate.property = wrapproperty 37 | 38 | return deprecate 39 | } 40 | 41 | /** 42 | * Return a wrapped function in a deprecation message. 43 | * 44 | * This is a no-op version of the wrapper, which does nothing but call 45 | * validation. 46 | */ 47 | 48 | function wrapfunction(fn, message) { 49 | if (typeof fn !== 'function') { 50 | throw new TypeError('argument fn must be a function') 51 | } 52 | 53 | return fn 54 | } 55 | 56 | /** 57 | * Wrap property in a deprecation message. 58 | * 59 | * This is a no-op version of the wrapper, which does nothing but call 60 | * validation. 61 | */ 62 | 63 | function wrapproperty(obj, prop, message) { 64 | if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { 65 | throw new TypeError('argument obj must be object') 66 | } 67 | 68 | var descriptor = Object.getOwnPropertyDescriptor(obj, prop) 69 | 70 | if (!descriptor) { 71 | throw new TypeError('must call property on owner object') 72 | } 73 | 74 | if (!descriptor.configurable) { 75 | throw new TypeError('property must be configurable') 76 | } 77 | 78 | return 79 | } 80 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/depd/lib/compat/buffer-concat.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2014 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | */ 12 | 13 | module.exports = bufferConcat 14 | 15 | /** 16 | * Concatenate an array of Buffers. 17 | */ 18 | 19 | function bufferConcat(bufs) { 20 | var length = 0 21 | 22 | for (var i = 0, len = bufs.length; i < len; i++) { 23 | length += bufs[i].length 24 | } 25 | 26 | var buf = new Buffer(length) 27 | var pos = 0 28 | 29 | for (var i = 0, len = bufs.length; i < len; i++) { 30 | bufs[i].copy(buf, pos) 31 | pos += bufs[i].length 32 | } 33 | 34 | return buf 35 | } 36 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/depd/lib/compat/event-listener-count.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2015 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = eventListenerCount 15 | 16 | /** 17 | * Get the count of listeners on an event emitter of a specific type. 18 | */ 19 | 20 | function eventListenerCount(emitter, type) { 21 | return emitter.listeners(type).length 22 | } 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/depd/lib/compat/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2014-2015 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module dependencies. 11 | * @private 12 | */ 13 | 14 | var Buffer = require('buffer') 15 | var EventEmitter = require('events').EventEmitter 16 | 17 | /** 18 | * Module exports. 19 | * @public 20 | */ 21 | 22 | lazyProperty(module.exports, 'bufferConcat', function bufferConcat() { 23 | return Buffer.concat || require('./buffer-concat') 24 | }) 25 | 26 | lazyProperty(module.exports, 'callSiteToString', function callSiteToString() { 27 | var limit = Error.stackTraceLimit 28 | var obj = {} 29 | var prep = Error.prepareStackTrace 30 | 31 | function prepareObjectStackTrace(obj, stack) { 32 | return stack 33 | } 34 | 35 | Error.prepareStackTrace = prepareObjectStackTrace 36 | Error.stackTraceLimit = 2 37 | 38 | // capture the stack 39 | Error.captureStackTrace(obj) 40 | 41 | // slice the stack 42 | var stack = obj.stack.slice() 43 | 44 | Error.prepareStackTrace = prep 45 | Error.stackTraceLimit = limit 46 | 47 | return stack[0].toString ? toString : require('./callsite-tostring') 48 | }) 49 | 50 | lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount() { 51 | return EventEmitter.listenerCount || require('./event-listener-count') 52 | }) 53 | 54 | /** 55 | * Define a lazy property. 56 | */ 57 | 58 | function lazyProperty(obj, prop, getter) { 59 | function get() { 60 | var val = getter() 61 | 62 | Object.defineProperty(obj, prop, { 63 | configurable: true, 64 | enumerable: true, 65 | value: val 66 | }) 67 | 68 | return val 69 | } 70 | 71 | Object.defineProperty(obj, prop, { 72 | configurable: true, 73 | enumerable: true, 74 | get: get 75 | }) 76 | } 77 | 78 | /** 79 | * Call toString() on the obj 80 | */ 81 | 82 | function toString(obj) { 83 | return obj.toString() 84 | } 85 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/destroy/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/destroy/README.md: -------------------------------------------------------------------------------- 1 | # Destroy 2 | 3 | [![NPM version][npm-image]][npm-url] 4 | [![Build status][travis-image]][travis-url] 5 | [![Test coverage][coveralls-image]][coveralls-url] 6 | [![License][license-image]][license-url] 7 | [![Downloads][downloads-image]][downloads-url] 8 | [![Gittip][gittip-image]][gittip-url] 9 | 10 | Destroy a stream. 11 | 12 | This module is meant to ensure a stream gets destroyed, handling different APIs 13 | and Node.js bugs. 14 | 15 | ## API 16 | 17 | ```js 18 | var destroy = require('destroy') 19 | ``` 20 | 21 | ### destroy(stream) 22 | 23 | Destroy the given stream. In most cases, this is identical to a simple 24 | `stream.destroy()` call. The rules are as follows for a given stream: 25 | 26 | 1. If the `stream` is an instance of `ReadStream`, then call `stream.destroy()` 27 | and add a listener to the `open` event to call `stream.close()` if it is 28 | fired. This is for a Node.js bug that will leak a file descriptor if 29 | `.destroy()` is called before `open`. 30 | 2. If the `stream` is not an instance of `Stream`, then nothing happens. 31 | 3. If the `stream` has a `.destroy()` method, then call it. 32 | 33 | The function returns the `stream` passed in as the argument. 34 | 35 | ## Example 36 | 37 | ```js 38 | var destroy = require('destroy') 39 | 40 | var fs = require('fs') 41 | var stream = fs.createReadStream('package.json') 42 | 43 | // ... and later 44 | destroy(stream) 45 | ``` 46 | 47 | [npm-image]: https://img.shields.io/npm/v/destroy.svg?style=flat-square 48 | [npm-url]: https://npmjs.org/package/destroy 49 | [github-tag]: http://img.shields.io/github/tag/stream-utils/destroy.svg?style=flat-square 50 | [github-url]: https://github.com/stream-utils/destroy/tags 51 | [travis-image]: https://img.shields.io/travis/stream-utils/destroy.svg?style=flat-square 52 | [travis-url]: https://travis-ci.org/stream-utils/destroy 53 | [coveralls-image]: https://img.shields.io/coveralls/stream-utils/destroy.svg?style=flat-square 54 | [coveralls-url]: https://coveralls.io/r/stream-utils/destroy?branch=master 55 | [license-image]: http://img.shields.io/npm/l/destroy.svg?style=flat-square 56 | [license-url]: LICENSE.md 57 | [downloads-image]: http://img.shields.io/npm/dm/destroy.svg?style=flat-square 58 | [downloads-url]: https://npmjs.org/package/destroy 59 | [gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square 60 | [gittip-url]: https://www.gittip.com/jonathanong/ 61 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/destroy/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * destroy 3 | * Copyright(c) 2014 Jonathan Ong 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module dependencies. 11 | * @private 12 | */ 13 | 14 | var ReadStream = require('fs').ReadStream 15 | var Stream = require('stream') 16 | 17 | /** 18 | * Module exports. 19 | * @public 20 | */ 21 | 22 | module.exports = destroy 23 | 24 | /** 25 | * Destroy a stream. 26 | * 27 | * @param {object} stream 28 | * @public 29 | */ 30 | 31 | function destroy(stream) { 32 | if (stream instanceof ReadStream) { 33 | return destroyReadStream(stream) 34 | } 35 | 36 | if (!(stream instanceof Stream)) { 37 | return stream 38 | } 39 | 40 | if (typeof stream.destroy === 'function') { 41 | stream.destroy() 42 | } 43 | 44 | return stream 45 | } 46 | 47 | /** 48 | * Destroy a ReadStream. 49 | * 50 | * @param {object} stream 51 | * @private 52 | */ 53 | 54 | function destroyReadStream(stream) { 55 | stream.destroy() 56 | 57 | if (typeof stream.close === 'function') { 58 | // node.js core bug work-around 59 | stream.on('open', onOpenClose) 60 | } 61 | 62 | return stream 63 | } 64 | 65 | /** 66 | * On open handler to close stream. 67 | * @private 68 | */ 69 | 70 | function onOpenClose() { 71 | if (typeof this.fd === 'number') { 72 | // actually close down the fd 73 | this.close() 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/ee-first/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/ee-first/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ee-first 3 | * Copyright(c) 2014 Jonathan Ong 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = first 15 | 16 | /** 17 | * Get the first event in a set of event emitters and event pairs. 18 | * 19 | * @param {array} stuff 20 | * @param {function} done 21 | * @public 22 | */ 23 | 24 | function first(stuff, done) { 25 | if (!Array.isArray(stuff)) 26 | throw new TypeError('arg must be an array of [ee, events...] arrays') 27 | 28 | var cleanups = [] 29 | 30 | for (var i = 0; i < stuff.length; i++) { 31 | var arr = stuff[i] 32 | 33 | if (!Array.isArray(arr) || arr.length < 2) 34 | throw new TypeError('each array member must be [ee, events...]') 35 | 36 | var ee = arr[0] 37 | 38 | for (var j = 1; j < arr.length; j++) { 39 | var event = arr[j] 40 | var fn = listener(event, callback) 41 | 42 | // listen to the event 43 | ee.on(event, fn) 44 | // push this listener to the list of cleanups 45 | cleanups.push({ 46 | ee: ee, 47 | event: event, 48 | fn: fn, 49 | }) 50 | } 51 | } 52 | 53 | function callback() { 54 | cleanup() 55 | done.apply(null, arguments) 56 | } 57 | 58 | function cleanup() { 59 | var x 60 | for (var i = 0; i < cleanups.length; i++) { 61 | x = cleanups[i] 62 | x.ee.removeListener(x.event, x.fn) 63 | } 64 | } 65 | 66 | function thunk(fn) { 67 | done = fn 68 | } 69 | 70 | thunk.cancel = cleanup 71 | 72 | return thunk 73 | } 74 | 75 | /** 76 | * Create the event listener. 77 | * @private 78 | */ 79 | 80 | function listener(event, done) { 81 | return function onevent(arg1) { 82 | var args = new Array(arguments.length) 83 | var ee = this 84 | var err = event === 'error' 85 | ? arg1 86 | : null 87 | 88 | // copy args to prevent arguments escaping scope 89 | for (var i = 0; i < args.length; i++) { 90 | args[i] = arguments[i] 91 | } 92 | 93 | done(err, ee, event, args) 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/error-inject/README.md: -------------------------------------------------------------------------------- 1 | error-inject 2 | ============ 3 | 4 | inject an error listener into a stream 5 | 6 | ## Install 7 | 8 | ``` 9 | npm install error-inject 10 | ``` 11 | 12 | ## Usage 13 | 14 | 15 | ```js 16 | var inject = require('error-inject'); 17 | 18 | function error(err) { 19 | console.error(err); 20 | } 21 | 22 | var rs = fs.createReadStream('index.js'); 23 | inject(rs, err); 24 | ``` 25 | 26 | ## License 27 | MIT 28 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/error-inject/index.js: -------------------------------------------------------------------------------- 1 | var Stream = require('stream'); 2 | 3 | module.exports = function (stream, error) { 4 | if (stream instanceof Stream 5 | && !~stream.listeners('error').indexOf(error)) { 6 | stream.on('error', error); 7 | } 8 | return stream; 9 | }; 10 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/error-inject/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "error-inject@~1.0.0", 6 | "scope": null, 7 | "escapedName": "error-inject", 8 | "name": "error-inject", 9 | "rawSpec": "~1.0.0", 10 | "spec": ">=1.0.0 <1.1.0", 11 | "type": "range" 12 | }, 13 | "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/koa" 14 | ] 15 | ], 16 | "_from": "error-inject@>=1.0.0 <1.1.0", 17 | "_id": "error-inject@1.0.0", 18 | "_inCache": true, 19 | "_location": "/error-inject", 20 | "_npmUser": { 21 | "name": "dead_horse", 22 | "email": "dead_horse@qq.com" 23 | }, 24 | "_npmVersion": "1.4.3", 25 | "_phantomChildren": {}, 26 | "_requested": { 27 | "raw": "error-inject@~1.0.0", 28 | "scope": null, 29 | "escapedName": "error-inject", 30 | "name": "error-inject", 31 | "rawSpec": "~1.0.0", 32 | "spec": ">=1.0.0 <1.1.0", 33 | "type": "range" 34 | }, 35 | "_requiredBy": [ 36 | "/koa" 37 | ], 38 | "_resolved": "https://registry.npmjs.org/error-inject/-/error-inject-1.0.0.tgz", 39 | "_shasum": "e2b3d91b54aed672f309d950d154850fa11d4f37", 40 | "_shrinkwrap": null, 41 | "_spec": "error-inject@~1.0.0", 42 | "_where": "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/koa", 43 | "author": { 44 | "name": "dead_horse", 45 | "email": "dead_horse@qq.com" 46 | }, 47 | "bugs": { 48 | "url": "https://github.com/node-modules/error-inject/issues" 49 | }, 50 | "dependencies": {}, 51 | "description": "inject an error listener into a stream", 52 | "devDependencies": {}, 53 | "directories": {}, 54 | "dist": { 55 | "shasum": "e2b3d91b54aed672f309d950d154850fa11d4f37", 56 | "tarball": "https://registry.npmjs.org/error-inject/-/error-inject-1.0.0.tgz" 57 | }, 58 | "files": [ 59 | "index.js" 60 | ], 61 | "homepage": "https://github.com/node-modules/error-inject", 62 | "keywords": [ 63 | "stream", 64 | "error", 65 | "listener" 66 | ], 67 | "license": "MIT", 68 | "main": "index.js", 69 | "maintainers": [ 70 | { 71 | "name": "dead_horse", 72 | "email": "dead_horse@qq.com" 73 | } 74 | ], 75 | "name": "error-inject", 76 | "optionalDependencies": {}, 77 | "readme": "ERROR: No README data found!", 78 | "repository": { 79 | "type": "git", 80 | "url": "git://github.com/node-modules/error-inject.git" 81 | }, 82 | "scripts": { 83 | "test": "echo \"Error: no test specified\" && exit 1" 84 | }, 85 | "version": "1.0.0" 86 | } 87 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/escape-html/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012-2013 TJ Holowaychuk 4 | Copyright (c) 2015 Andreas Lubbe 5 | Copyright (c) 2015 Tiancheng "Timothy" Gu 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | 'Software'), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/escape-html/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | # escape-html 3 | 4 | Escape string for use in HTML 5 | 6 | ## Example 7 | 8 | ```js 9 | var escape = require('escape-html'); 10 | var html = escape('foo & bar'); 11 | // -> foo & bar 12 | ``` 13 | 14 | ## Benchmark 15 | 16 | ``` 17 | $ npm run-script bench 18 | 19 | > escape-html@1.0.3 bench nodejs-escape-html 20 | > node benchmark/index.js 21 | 22 | 23 | http_parser@1.0 24 | node@0.10.33 25 | v8@3.14.5.9 26 | ares@1.9.0-DEV 27 | uv@0.10.29 28 | zlib@1.2.3 29 | modules@11 30 | openssl@1.0.1j 31 | 32 | 1 test completed. 33 | 2 tests completed. 34 | 3 tests completed. 35 | 36 | no special characters x 19,435,271 ops/sec ±0.85% (187 runs sampled) 37 | single special character x 6,132,421 ops/sec ±0.67% (194 runs sampled) 38 | many special characters x 3,175,826 ops/sec ±0.65% (193 runs sampled) 39 | ``` 40 | 41 | ## License 42 | 43 | MIT -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/escape-html/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * escape-html 3 | * Copyright(c) 2012-2013 TJ Holowaychuk 4 | * Copyright(c) 2015 Andreas Lubbe 5 | * Copyright(c) 2015 Tiancheng "Timothy" Gu 6 | * MIT Licensed 7 | */ 8 | 9 | 'use strict'; 10 | 11 | /** 12 | * Module variables. 13 | * @private 14 | */ 15 | 16 | var matchHtmlRegExp = /["'&<>]/; 17 | 18 | /** 19 | * Module exports. 20 | * @public 21 | */ 22 | 23 | module.exports = escapeHtml; 24 | 25 | /** 26 | * Escape special characters in the given string of html. 27 | * 28 | * @param {string} string The string to escape for inserting into HTML 29 | * @return {string} 30 | * @public 31 | */ 32 | 33 | function escapeHtml(string) { 34 | var str = '' + string; 35 | var match = matchHtmlRegExp.exec(str); 36 | 37 | if (!match) { 38 | return str; 39 | } 40 | 41 | var escape; 42 | var html = ''; 43 | var index = 0; 44 | var lastIndex = 0; 45 | 46 | for (index = match.index; index < str.length; index++) { 47 | switch (str.charCodeAt(index)) { 48 | case 34: // " 49 | escape = '"'; 50 | break; 51 | case 38: // & 52 | escape = '&'; 53 | break; 54 | case 39: // ' 55 | escape = '''; 56 | break; 57 | case 60: // < 58 | escape = '<'; 59 | break; 60 | case 62: // > 61 | escape = '>'; 62 | break; 63 | default: 64 | continue; 65 | } 66 | 67 | if (lastIndex !== index) { 68 | html += str.substring(lastIndex, index); 69 | } 70 | 71 | lastIndex = index + 1; 72 | html += escape; 73 | } 74 | 75 | return lastIndex !== index 76 | ? html + str.substring(lastIndex, index) 77 | : html; 78 | } 79 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/escape-html/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "escape-html@~1.0.1", 6 | "scope": null, 7 | "escapedName": "escape-html", 8 | "name": "escape-html", 9 | "rawSpec": "~1.0.1", 10 | "spec": ">=1.0.1 <1.1.0", 11 | "type": "range" 12 | }, 13 | "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/koa" 14 | ] 15 | ], 16 | "_from": "escape-html@>=1.0.1 <1.1.0", 17 | "_id": "escape-html@1.0.3", 18 | "_inCache": true, 19 | "_location": "/escape-html", 20 | "_npmUser": { 21 | "name": "dougwilson", 22 | "email": "doug@somethingdoug.com" 23 | }, 24 | "_npmVersion": "1.4.28", 25 | "_phantomChildren": {}, 26 | "_requested": { 27 | "raw": "escape-html@~1.0.1", 28 | "scope": null, 29 | "escapedName": "escape-html", 30 | "name": "escape-html", 31 | "rawSpec": "~1.0.1", 32 | "spec": ">=1.0.1 <1.1.0", 33 | "type": "range" 34 | }, 35 | "_requiredBy": [ 36 | "/koa" 37 | ], 38 | "_resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 39 | "_shasum": "0258eae4d3d0c0974de1c169188ef0051d1d1988", 40 | "_shrinkwrap": null, 41 | "_spec": "escape-html@~1.0.1", 42 | "_where": "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/koa", 43 | "bugs": { 44 | "url": "https://github.com/component/escape-html/issues" 45 | }, 46 | "dependencies": {}, 47 | "description": "Escape string for use in HTML", 48 | "devDependencies": { 49 | "beautify-benchmark": "0.2.4", 50 | "benchmark": "1.0.0" 51 | }, 52 | "directories": {}, 53 | "dist": { 54 | "shasum": "0258eae4d3d0c0974de1c169188ef0051d1d1988", 55 | "tarball": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" 56 | }, 57 | "files": [ 58 | "LICENSE", 59 | "Readme.md", 60 | "index.js" 61 | ], 62 | "gitHead": "7ac2ea3977fcac3d4c5be8d2a037812820c65f28", 63 | "homepage": "https://github.com/component/escape-html", 64 | "keywords": [ 65 | "escape", 66 | "html", 67 | "utility" 68 | ], 69 | "license": "MIT", 70 | "maintainers": [ 71 | { 72 | "name": "tjholowaychuk", 73 | "email": "tj@vision-media.ca" 74 | }, 75 | { 76 | "name": "dougwilson", 77 | "email": "doug@somethingdoug.com" 78 | } 79 | ], 80 | "name": "escape-html", 81 | "optionalDependencies": {}, 82 | "readme": "ERROR: No README data found!", 83 | "repository": { 84 | "type": "git", 85 | "url": "git+https://github.com/component/escape-html.git" 86 | }, 87 | "scripts": { 88 | "bench": "node benchmark/index.js" 89 | }, 90 | "version": "1.0.3" 91 | } 92 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/fresh/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.3.0 / 2015-05-12 2 | ================== 3 | 4 | * Add weak `ETag` matching support 5 | 6 | 0.2.4 / 2014-09-07 7 | ================== 8 | 9 | * Support Node.js 0.6 10 | 11 | 0.2.3 / 2014-09-07 12 | ================== 13 | 14 | * Move repository to jshttp 15 | 16 | 0.2.2 / 2014-02-19 17 | ================== 18 | 19 | * Revert "Fix for blank page on Safari reload" 20 | 21 | 0.2.1 / 2014-01-29 22 | ================== 23 | 24 | * Fix for blank page on Safari reload 25 | 26 | 0.2.0 / 2013-08-11 27 | ================== 28 | 29 | * Return stale for `Cache-Control: no-cache` 30 | 31 | 0.1.0 / 2012-06-15 32 | ================== 33 | * Add `If-None-Match: *` support 34 | 35 | 0.0.1 / 2012-06-10 36 | ================== 37 | 38 | * Initial release 39 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/fresh/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/fresh/README.md: -------------------------------------------------------------------------------- 1 | # fresh 2 | 3 | [![NPM Version][npm-image]][npm-url] 4 | [![NPM Downloads][downloads-image]][downloads-url] 5 | [![Node.js Version][node-version-image]][node-version-url] 6 | [![Build Status][travis-image]][travis-url] 7 | [![Test Coverage][coveralls-image]][coveralls-url] 8 | 9 | HTTP response freshness testing 10 | 11 | ## Installation 12 | 13 | ``` 14 | $ npm install fresh 15 | ``` 16 | 17 | ## API 18 | 19 | ```js 20 | var fresh = require('fresh') 21 | ``` 22 | 23 | ### fresh(req, res) 24 | 25 | Check freshness of `req` and `res` headers. 26 | 27 | When the cache is "fresh" __true__ is returned, 28 | otherwise __false__ is returned to indicate that 29 | the cache is now stale. 30 | 31 | ## Example 32 | 33 | ```js 34 | var req = { 'if-none-match': 'tobi' }; 35 | var res = { 'etag': 'luna' }; 36 | fresh(req, res); 37 | // => false 38 | 39 | var req = { 'if-none-match': 'tobi' }; 40 | var res = { 'etag': 'tobi' }; 41 | fresh(req, res); 42 | // => true 43 | ``` 44 | 45 | ## License 46 | 47 | [MIT](LICENSE) 48 | 49 | [npm-image]: https://img.shields.io/npm/v/fresh.svg 50 | [npm-url]: https://npmjs.org/package/fresh 51 | [node-version-image]: https://img.shields.io/node/v/fresh.svg 52 | [node-version-url]: http://nodejs.org/download/ 53 | [travis-image]: https://img.shields.io/travis/jshttp/fresh/master.svg 54 | [travis-url]: https://travis-ci.org/jshttp/fresh 55 | [coveralls-image]: https://img.shields.io/coveralls/jshttp/fresh/master.svg 56 | [coveralls-url]: https://coveralls.io/r/jshttp/fresh?branch=master 57 | [downloads-image]: https://img.shields.io/npm/dm/fresh.svg 58 | [downloads-url]: https://npmjs.org/package/fresh 59 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/fresh/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Expose `fresh()`. 4 | */ 5 | 6 | module.exports = fresh; 7 | 8 | /** 9 | * Check freshness of `req` and `res` headers. 10 | * 11 | * When the cache is "fresh" __true__ is returned, 12 | * otherwise __false__ is returned to indicate that 13 | * the cache is now stale. 14 | * 15 | * @param {Object} req 16 | * @param {Object} res 17 | * @return {Boolean} 18 | * @api public 19 | */ 20 | 21 | function fresh(req, res) { 22 | // defaults 23 | var etagMatches = true; 24 | var notModified = true; 25 | 26 | // fields 27 | var modifiedSince = req['if-modified-since']; 28 | var noneMatch = req['if-none-match']; 29 | var lastModified = res['last-modified']; 30 | var etag = res['etag']; 31 | var cc = req['cache-control']; 32 | 33 | // unconditional request 34 | if (!modifiedSince && !noneMatch) return false; 35 | 36 | // check for no-cache cache request directive 37 | if (cc && cc.indexOf('no-cache') !== -1) return false; 38 | 39 | // parse if-none-match 40 | if (noneMatch) noneMatch = noneMatch.split(/ *, */); 41 | 42 | // if-none-match 43 | if (noneMatch) { 44 | etagMatches = noneMatch.some(function (match) { 45 | return match === '*' || match === etag || match === 'W/' + etag; 46 | }); 47 | } 48 | 49 | // if-modified-since 50 | if (modifiedSince) { 51 | modifiedSince = new Date(modifiedSince); 52 | lastModified = new Date(lastModified); 53 | notModified = lastModified <= modifiedSince; 54 | } 55 | 56 | return !! (etagMatches && notModified); 57 | } 58 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/http-assert/HISTORY.md: -------------------------------------------------------------------------------- 1 | 2 | 2016-02-27 / 1.2.0 3 | ================== 4 | 5 | * update `http-errors` 6 | 7 | 2014-12-10 / 1.1.0 8 | ================== 9 | 10 | * add equality methods @stephenmathieson 11 | * `.equal()`, `.notEqual()` 12 | * `.strictEqual()`, `.notStrictEqual()` 13 | * `.deepEqual()`, `.notDeepEqual()` 14 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/http-assert/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/http-assert/index.js: -------------------------------------------------------------------------------- 1 | var createError = require('http-errors'); 2 | var eql = require('deep-equal'); 3 | 4 | module.exports = assert; 5 | 6 | function assert(value, status, msg, opts) { 7 | if (value) return; 8 | throw createError(status, msg, opts); 9 | } 10 | 11 | assert.equal = function(a, b, status, msg, opts) { 12 | assert(a == b, status, msg, opts); 13 | }; 14 | 15 | assert.notEqual = function(a, b, status, msg, opts) { 16 | assert(a != b, status, msg, opts); 17 | }; 18 | 19 | assert.strictEqual = function(a, b, status, msg, opts) { 20 | assert(a === b, status, msg, opts); 21 | }; 22 | 23 | assert.notStrictEqual = function(a, b, status, msg, opts) { 24 | assert(a !== b, status, msg, opts); 25 | }; 26 | 27 | assert.deepEqual = function(a, b, status, msg, opts) { 28 | assert(eql(a, b), status, msg, opts); 29 | }; 30 | 31 | assert.notDeepEqual = function(a, b, status, msg, opts) { 32 | assert(!eql(a, b), status, msg, opts); 33 | }; 34 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/http-assert/node_modules/http-errors/HISTORY.md: -------------------------------------------------------------------------------- 1 | 2016-01-28 / 1.4.0 2 | ================== 3 | 4 | * Add `HttpError` export, for `err instanceof createError.HttpError` 5 | * deps: inherits@2.0.1 6 | * deps: statuses@'>= 1.2.1 < 2' 7 | - Fix message for status 451 8 | - Remove incorrect nginx status code 9 | 10 | 2015-02-02 / 1.3.1 11 | ================== 12 | 13 | * Fix regression where status can be overwritten in `createError` `props` 14 | 15 | 2015-02-01 / 1.3.0 16 | ================== 17 | 18 | * Construct errors using defined constructors from `createError` 19 | * Fix error names that are not identifiers 20 | - `createError["I'mateapot"]` is now `createError.ImATeapot` 21 | * Set a meaningful `name` property on constructed errors 22 | 23 | 2014-12-09 / 1.2.8 24 | ================== 25 | 26 | * Fix stack trace from exported function 27 | * Remove `arguments.callee` usage 28 | 29 | 2014-10-14 / 1.2.7 30 | ================== 31 | 32 | * Remove duplicate line 33 | 34 | 2014-10-02 / 1.2.6 35 | ================== 36 | 37 | * Fix `expose` to be `true` for `ClientError` constructor 38 | 39 | 2014-09-28 / 1.2.5 40 | ================== 41 | 42 | * deps: statuses@1 43 | 44 | 2014-09-21 / 1.2.4 45 | ================== 46 | 47 | * Fix dependency version to work with old `npm`s 48 | 49 | 2014-09-21 / 1.2.3 50 | ================== 51 | 52 | * deps: statuses@~1.1.0 53 | 54 | 2014-09-21 / 1.2.2 55 | ================== 56 | 57 | * Fix publish error 58 | 59 | 2014-09-21 / 1.2.1 60 | ================== 61 | 62 | * Support Node.js 0.6 63 | * Use `inherits` instead of `util` 64 | 65 | 2014-09-09 / 1.2.0 66 | ================== 67 | 68 | * Fix the way inheriting functions 69 | * Support `expose` being provided in properties argument 70 | 71 | 2014-09-08 / 1.1.0 72 | ================== 73 | 74 | * Default status to 500 75 | * Support provided `error` to extend 76 | 77 | 2014-09-08 / 1.0.1 78 | ================== 79 | 80 | * Fix accepting string message 81 | 82 | 2014-09-08 / 1.0.0 83 | ================== 84 | 85 | * Initial release 86 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/http-assert/node_modules/http-errors/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/http-assert/node_modules/http-errors/README.md: -------------------------------------------------------------------------------- 1 | # http-errors 2 | 3 | [![NPM Version][npm-image]][npm-url] 4 | [![NPM Downloads][downloads-image]][downloads-url] 5 | [![Node.js Version][node-version-image]][node-version-url] 6 | [![Build Status][travis-image]][travis-url] 7 | [![Test Coverage][coveralls-image]][coveralls-url] 8 | 9 | Create HTTP errors for Express, Koa, Connect, etc. with ease. 10 | 11 | ## Example 12 | 13 | ```js 14 | var createError = require('http-errors'); 15 | 16 | app.use(function (req, res, next) { 17 | if (!req.user) return next(createError(401, 'Please login to view this page.')); 18 | next(); 19 | }) 20 | ``` 21 | 22 | ## API 23 | 24 | This is the current API, currently extracted from Koa and subject to change. 25 | 26 | All errors inherit from JavaScript `Error` and the exported `createError.HttpError`. 27 | 28 | ### Error Properties 29 | 30 | - `expose` - can be used to signal if `message` should be sent to the client, defaulting to `false` when `status` >= 500 31 | - `message` 32 | - `status` and `statusCode` - the status code of the error, defaulting to `500` 33 | 34 | ### createError([status], [message], [properties]) 35 | 36 | ```js 37 | var err = createError(404, 'This video does not exist!'); 38 | ``` 39 | 40 | - `status: 500` - the status code as a number 41 | - `message` - the message of the error, defaulting to node's text for that status code. 42 | - `properties` - custom properties to attach to the object 43 | 44 | ### new createError\[code || name\](\[msg]\)) 45 | 46 | ```js 47 | var err = new createError.NotFound(); 48 | ``` 49 | 50 | - `code` - the status code as a number 51 | - `name` - the name of the error as a "bumpy case", i.e. `NotFound` or `InternalServerError`. 52 | 53 | ## License 54 | 55 | [MIT](LICENSE) 56 | 57 | [npm-image]: https://img.shields.io/npm/v/http-errors.svg?style=flat 58 | [npm-url]: https://npmjs.org/package/http-errors 59 | [node-version-image]: https://img.shields.io/node/v/http-errors.svg?style=flat 60 | [node-version-url]: https://nodejs.org/en/download/ 61 | [travis-image]: https://img.shields.io/travis/jshttp/http-errors.svg?style=flat 62 | [travis-url]: https://travis-ci.org/jshttp/http-errors 63 | [coveralls-image]: https://img.shields.io/coveralls/jshttp/http-errors.svg?style=flat 64 | [coveralls-url]: https://coveralls.io/r/jshttp/http-errors 65 | [downloads-image]: https://img.shields.io/npm/dm/http-errors.svg?style=flat 66 | [downloads-url]: https://npmjs.org/package/http-errors 67 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/http-assert/readme.md: -------------------------------------------------------------------------------- 1 | #http-assert 2 | 3 | [![NPM version][npm-image]][npm-url] 4 | [![Build status][travis-image]][travis-url] 5 | [![Test coverage][coveralls-image]][coveralls-url] 6 | [![Dependency Status][david-image]][david-url] 7 | [![License][license-image]][license-url] 8 | [![Downloads][downloads-image]][downloads-url] 9 | 10 | Assert with status codes. Like ctx.throw() in Koa, but with a guard. 11 | 12 | ##Example 13 | ```js 14 | var assert = require('http-assert'); 15 | var ok = require('assert'); 16 | 17 | try { 18 | assert(username == 'fjodor', 401, 'authentication failed'); 19 | } catch (err) { 20 | ok(err.status == 401); 21 | ok(err.message == 'authentication failed'); 22 | ok(err.expose); 23 | } 24 | ``` 25 | 26 | ##Licence 27 | MIT 28 | 29 | [npm-image]: https://img.shields.io/npm/v/http-assert.svg?style=flat-square 30 | [npm-url]: https://npmjs.org/package/http-assert 31 | [travis-image]: https://img.shields.io/travis/jshttp/http-assert.svg?style=flat-square 32 | [travis-url]: https://travis-ci.org/jshttp/http-assert 33 | [coveralls-image]: https://img.shields.io/coveralls/jshttp/http-assert.svg?style=flat-square 34 | [coveralls-url]: https://coveralls.io/r/jshttp/http-assert?branch=master 35 | [david-image]: http://img.shields.io/david/jshttp/http-assert.svg?style=flat-square 36 | [david-url]: https://david-dm.org/jshttp/http-assert 37 | [license-image]: http://img.shields.io/npm/l/http-assert.svg?style=flat-square 38 | [license-url]: LICENSE 39 | [downloads-image]: http://img.shields.io/npm/dm/http-assert.svg?style=flat-square 40 | [downloads-url]: https://npmjs.org/package/http-assert 41 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/http-errors/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/http-errors/node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/http-errors/node_modules/inherits/README.md: -------------------------------------------------------------------------------- 1 | Browser-friendly inheritance fully compatible with standard node.js 2 | [inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). 3 | 4 | This package exports standard `inherits` from node.js `util` module in 5 | node environment, but also provides alternative browser-friendly 6 | implementation through [browser 7 | field](https://gist.github.com/shtylman/4339901). Alternative 8 | implementation is a literal copy of standard one located in standalone 9 | module to avoid requiring of `util`. It also has a shim for old 10 | browsers with no `Object.create` support. 11 | 12 | While keeping you sure you are using standard `inherits` 13 | implementation in node.js environment, it allows bundlers such as 14 | [browserify](https://github.com/substack/node-browserify) to not 15 | include full `util` package to your client code if all you need is 16 | just `inherits` function. It worth, because browser shim for `util` 17 | package is large and `inherits` is often the single function you need 18 | from it. 19 | 20 | It's recommended to use this package instead of 21 | `require('util').inherits` for any code that has chances to be used 22 | not only in node.js but in browser too. 23 | 24 | ## usage 25 | 26 | ```js 27 | var inherits = require('inherits'); 28 | // then use exactly as the standard one 29 | ``` 30 | 31 | ## note on version ~1.0 32 | 33 | Version ~1.0 had completely different motivation and is not compatible 34 | neither with 2.0 nor with standard node.js `inherits`. 35 | 36 | If you are using version ~1.0 and planning to switch to ~2.0, be 37 | careful: 38 | 39 | * new version uses `super_` instead of `super` for referencing 40 | superclass 41 | * new version overwrites current prototype while old one preserves any 42 | existing fields on it 43 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/http-errors/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | try { 2 | var util = require('util'); 3 | if (typeof util.inherits !== 'function') throw ''; 4 | module.exports = util.inherits; 5 | } catch (e) { 6 | module.exports = require('./inherits_browser.js'); 7 | } 8 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/http-errors/node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | ctor.super_ = superCtor 5 | ctor.prototype = Object.create(superCtor.prototype, { 6 | constructor: { 7 | value: ctor, 8 | enumerable: false, 9 | writable: true, 10 | configurable: true 11 | } 12 | }); 13 | }; 14 | } else { 15 | // old school shim for old browsers 16 | module.exports = function inherits(ctor, superCtor) { 17 | ctor.super_ = superCtor 18 | var TempCtor = function () {} 19 | TempCtor.prototype = superCtor.prototype 20 | ctor.prototype = new TempCtor() 21 | ctor.prototype.constructor = ctor 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/inherits/README.md: -------------------------------------------------------------------------------- 1 | Browser-friendly inheritance fully compatible with standard node.js 2 | [inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). 3 | 4 | This package exports standard `inherits` from node.js `util` module in 5 | node environment, but also provides alternative browser-friendly 6 | implementation through [browser 7 | field](https://gist.github.com/shtylman/4339901). Alternative 8 | implementation is a literal copy of standard one located in standalone 9 | module to avoid requiring of `util`. It also has a shim for old 10 | browsers with no `Object.create` support. 11 | 12 | While keeping you sure you are using standard `inherits` 13 | implementation in node.js environment, it allows bundlers such as 14 | [browserify](https://github.com/substack/node-browserify) to not 15 | include full `util` package to your client code if all you need is 16 | just `inherits` function. It worth, because browser shim for `util` 17 | package is large and `inherits` is often the single function you need 18 | from it. 19 | 20 | It's recommended to use this package instead of 21 | `require('util').inherits` for any code that has chances to be used 22 | not only in node.js but in browser too. 23 | 24 | ## usage 25 | 26 | ```js 27 | var inherits = require('inherits'); 28 | // then use exactly as the standard one 29 | ``` 30 | 31 | ## note on version ~1.0 32 | 33 | Version ~1.0 had completely different motivation and is not compatible 34 | neither with 2.0 nor with standard node.js `inherits`. 35 | 36 | If you are using version ~1.0 and planning to switch to ~2.0, be 37 | careful: 38 | 39 | * new version uses `super_` instead of `super` for referencing 40 | superclass 41 | * new version overwrites current prototype while old one preserves any 42 | existing fields on it 43 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | module.exports = require('util').inherits 2 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | ctor.super_ = superCtor 5 | ctor.prototype = Object.create(superCtor.prototype, { 6 | constructor: { 7 | value: ctor, 8 | enumerable: false, 9 | writable: true, 10 | configurable: true 11 | } 12 | }); 13 | }; 14 | } else { 15 | // old school shim for old browsers 16 | module.exports = function inherits(ctor, superCtor) { 17 | ctor.super_ = superCtor 18 | var TempCtor = function () {} 19 | TempCtor.prototype = superCtor.prototype 20 | ctor.prototype = new TempCtor() 21 | ctor.prototype.constructor = ctor 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/inherits/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "inherits@2.0.1", 6 | "scope": null, 7 | "escapedName": "inherits", 8 | "name": "inherits", 9 | "rawSpec": "2.0.1", 10 | "spec": "2.0.1", 11 | "type": "version" 12 | }, 13 | "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/http-assert/node_modules/http-errors" 14 | ] 15 | ], 16 | "_from": "inherits@2.0.1", 17 | "_id": "inherits@2.0.1", 18 | "_inCache": true, 19 | "_location": "/inherits", 20 | "_npmUser": { 21 | "name": "isaacs", 22 | "email": "i@izs.me" 23 | }, 24 | "_npmVersion": "1.3.8", 25 | "_phantomChildren": {}, 26 | "_requested": { 27 | "raw": "inherits@2.0.1", 28 | "scope": null, 29 | "escapedName": "inherits", 30 | "name": "inherits", 31 | "rawSpec": "2.0.1", 32 | "spec": "2.0.1", 33 | "type": "version" 34 | }, 35 | "_requiredBy": [ 36 | "/http-assert/http-errors" 37 | ], 38 | "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", 39 | "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", 40 | "_shrinkwrap": null, 41 | "_spec": "inherits@2.0.1", 42 | "_where": "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/http-assert/node_modules/http-errors", 43 | "browser": "./inherits_browser.js", 44 | "bugs": { 45 | "url": "https://github.com/isaacs/inherits/issues" 46 | }, 47 | "dependencies": {}, 48 | "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", 49 | "devDependencies": {}, 50 | "directories": {}, 51 | "dist": { 52 | "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", 53 | "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" 54 | }, 55 | "homepage": "https://github.com/isaacs/inherits#readme", 56 | "keywords": [ 57 | "inheritance", 58 | "class", 59 | "klass", 60 | "oop", 61 | "object-oriented", 62 | "inherits", 63 | "browser", 64 | "browserify" 65 | ], 66 | "license": "ISC", 67 | "main": "./inherits.js", 68 | "maintainers": [ 69 | { 70 | "name": "isaacs", 71 | "email": "i@izs.me" 72 | } 73 | ], 74 | "name": "inherits", 75 | "optionalDependencies": {}, 76 | "readme": "ERROR: No README data found!", 77 | "repository": { 78 | "type": "git", 79 | "url": "git://github.com/isaacs/inherits.git" 80 | }, 81 | "scripts": { 82 | "test": "node test" 83 | }, 84 | "version": "2.0.1" 85 | } 86 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/inherits/test.js: -------------------------------------------------------------------------------- 1 | var inherits = require('./inherits.js') 2 | var assert = require('assert') 3 | 4 | function test(c) { 5 | assert(c.constructor === Child) 6 | assert(c.constructor.super_ === Parent) 7 | assert(Object.getPrototypeOf(c) === Child.prototype) 8 | assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) 9 | assert(c instanceof Child) 10 | assert(c instanceof Parent) 11 | } 12 | 13 | function Child() { 14 | Parent.call(this) 15 | test(this) 16 | } 17 | 18 | function Parent() {} 19 | 20 | inherits(Child, Parent) 21 | 22 | var c = new Child 23 | test(c) 24 | 25 | console.log('ok') 26 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/isarray/README.md: -------------------------------------------------------------------------------- 1 | 2 | # isarray 3 | 4 | `Array#isArray` for older browsers. 5 | 6 | ## Usage 7 | 8 | ```js 9 | var isArray = require('isarray'); 10 | 11 | console.log(isArray([])); // => true 12 | console.log(isArray({})); // => false 13 | ``` 14 | 15 | ## Installation 16 | 17 | With [npm](http://npmjs.org) do 18 | 19 | ```bash 20 | $ npm install isarray 21 | ``` 22 | 23 | Then bundle for the browser with 24 | [browserify](https://github.com/substack/browserify). 25 | 26 | With [component](http://component.io) do 27 | 28 | ```bash 29 | $ component install juliangruber/isarray 30 | ``` 31 | 32 | ## License 33 | 34 | (MIT) 35 | 36 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 37 | 38 | Permission is hereby granted, free of charge, to any person obtaining a copy of 39 | this software and associated documentation files (the "Software"), to deal in 40 | the Software without restriction, including without limitation the rights to 41 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 42 | of the Software, and to permit persons to whom the Software is furnished to do 43 | so, subject to the following conditions: 44 | 45 | The above copyright notice and this permission notice shall be included in all 46 | copies or substantial portions of the Software. 47 | 48 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 49 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 50 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 51 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 52 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 53 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 54 | SOFTWARE. 55 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/isarray/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "isarray", 3 | "description" : "Array#isArray for older browsers", 4 | "version" : "0.0.1", 5 | "repository" : "juliangruber/isarray", 6 | "homepage": "https://github.com/juliangruber/isarray", 7 | "main" : "index.js", 8 | "scripts" : [ 9 | "index.js" 10 | ], 11 | "dependencies" : {}, 12 | "keywords": ["browser","isarray","array"], 13 | "author": { 14 | "name": "Julian Gruber", 15 | "email": "mail@juliangruber.com", 16 | "url": "http://juliangruber.com" 17 | }, 18 | "license": "MIT" 19 | } 20 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/isarray/index.js: -------------------------------------------------------------------------------- 1 | module.exports = Array.isArray || function (arr) { 2 | return Object.prototype.toString.call(arr) == '[object Array]'; 3 | }; 4 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/isarray/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "isarray@0.0.1", 6 | "scope": null, 7 | "escapedName": "isarray", 8 | "name": "isarray", 9 | "rawSpec": "0.0.1", 10 | "spec": "0.0.1", 11 | "type": "version" 12 | }, 13 | "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/path-to-regexp" 14 | ] 15 | ], 16 | "_from": "isarray@0.0.1", 17 | "_id": "isarray@0.0.1", 18 | "_inCache": true, 19 | "_location": "/isarray", 20 | "_npmUser": { 21 | "name": "juliangruber", 22 | "email": "julian@juliangruber.com" 23 | }, 24 | "_npmVersion": "1.2.18", 25 | "_phantomChildren": {}, 26 | "_requested": { 27 | "raw": "isarray@0.0.1", 28 | "scope": null, 29 | "escapedName": "isarray", 30 | "name": "isarray", 31 | "rawSpec": "0.0.1", 32 | "spec": "0.0.1", 33 | "type": "version" 34 | }, 35 | "_requiredBy": [ 36 | "/path-to-regexp" 37 | ], 38 | "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", 39 | "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", 40 | "_shrinkwrap": null, 41 | "_spec": "isarray@0.0.1", 42 | "_where": "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/path-to-regexp", 43 | "author": { 44 | "name": "Julian Gruber", 45 | "email": "mail@juliangruber.com", 46 | "url": "http://juliangruber.com" 47 | }, 48 | "bugs": { 49 | "url": "https://github.com/juliangruber/isarray/issues" 50 | }, 51 | "dependencies": {}, 52 | "description": "Array#isArray for older browsers", 53 | "devDependencies": { 54 | "tap": "*" 55 | }, 56 | "directories": {}, 57 | "dist": { 58 | "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", 59 | "tarball": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" 60 | }, 61 | "homepage": "https://github.com/juliangruber/isarray", 62 | "keywords": [ 63 | "browser", 64 | "isarray", 65 | "array" 66 | ], 67 | "license": "MIT", 68 | "main": "index.js", 69 | "maintainers": [ 70 | { 71 | "name": "juliangruber", 72 | "email": "julian@juliangruber.com" 73 | } 74 | ], 75 | "name": "isarray", 76 | "optionalDependencies": {}, 77 | "readme": "ERROR: No README data found!", 78 | "repository": { 79 | "type": "git", 80 | "url": "git://github.com/juliangruber/isarray.git" 81 | }, 82 | "scripts": { 83 | "test": "tap test/*.js" 84 | }, 85 | "version": "0.0.1" 86 | } 87 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/keygrip/.npmignore: -------------------------------------------------------------------------------- 1 | lib/defaultKeys.js 2 | defaultKeys.js 3 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/keygrip/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/keygrip/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Jed Schmidt, http://jedschmidt.com/ 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/keygrip/index.js: -------------------------------------------------------------------------------- 1 | var crypto = require("crypto") 2 | 3 | function Keygrip(keys, algorithm, encoding) { 4 | if (!algorithm) algorithm = "sha1"; 5 | if (!encoding) encoding = "base64"; 6 | if (!(this instanceof Keygrip)) return new Keygrip(keys, algorithm, encoding) 7 | 8 | if (!keys || !(0 in keys)) { 9 | throw new Error("Keys must be provided.") 10 | } 11 | 12 | function sign(data, key) { 13 | return crypto 14 | .createHmac(algorithm, key) 15 | .update(data).digest(encoding) 16 | .replace(/\/|\+|=/g, function(x) { 17 | return ({ "/": "_", "+": "-", "=": "" })[x] 18 | }) 19 | } 20 | 21 | this.sign = function(data){ return sign(data, keys[0]) } 22 | 23 | this.verify = function(data, digest) { 24 | return this.index(data, digest) > -1 25 | } 26 | 27 | this.index = function(data, digest) { 28 | for (var i = 0, l = keys.length; i < l; i++) { 29 | if (constantTimeCompare(digest, sign(data, keys[i]))) return i 30 | } 31 | 32 | return -1 33 | } 34 | } 35 | 36 | Keygrip.sign = Keygrip.verify = Keygrip.index = function() { 37 | throw new Error("Usage: require('keygrip')()") 38 | } 39 | 40 | //http://codahale.com/a-lesson-in-timing-attacks/ 41 | var constantTimeCompare = function(val1, val2){ 42 | if(val1 == null && val2 != null){ 43 | return false; 44 | } else if(val2 == null && val1 != null){ 45 | return false; 46 | } else if(val1 == null && val2 == null){ 47 | return true; 48 | } 49 | 50 | if(val1.length !== val2.length){ 51 | return false; 52 | } 53 | 54 | var matches = 1; 55 | 56 | for(var i = 0; i < val1.length; i++){ 57 | matches &= (val1.charAt(i) === val2.charAt(i) ? 1 : 0); //Don't short circuit 58 | } 59 | 60 | return matches === 1; 61 | }; 62 | 63 | module.exports = Keygrip 64 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/keygrip/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "keygrip@~1.0.1", 6 | "scope": null, 7 | "escapedName": "keygrip", 8 | "name": "keygrip", 9 | "rawSpec": "~1.0.1", 10 | "spec": ">=1.0.1 <1.1.0", 11 | "type": "range" 12 | }, 13 | "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/cookies" 14 | ] 15 | ], 16 | "_from": "keygrip@>=1.0.1 <1.1.0", 17 | "_id": "keygrip@1.0.1", 18 | "_inCache": true, 19 | "_location": "/keygrip", 20 | "_npmUser": { 21 | "name": "jed", 22 | "email": "where@jed.is" 23 | }, 24 | "_npmVersion": "1.4.3", 25 | "_phantomChildren": {}, 26 | "_requested": { 27 | "raw": "keygrip@~1.0.1", 28 | "scope": null, 29 | "escapedName": "keygrip", 30 | "name": "keygrip", 31 | "rawSpec": "~1.0.1", 32 | "spec": ">=1.0.1 <1.1.0", 33 | "type": "range" 34 | }, 35 | "_requiredBy": [ 36 | "/cookies" 37 | ], 38 | "_resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.0.1.tgz", 39 | "_shasum": "b02fa4816eef21a8c4b35ca9e52921ffc89a30e9", 40 | "_shrinkwrap": null, 41 | "_spec": "keygrip@~1.0.1", 42 | "_where": "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/cookies", 43 | "bugs": { 44 | "url": "https://github.com/expressjs/keygrip/issues" 45 | }, 46 | "dependencies": {}, 47 | "description": "Key signing and verification for rotated credentials", 48 | "devDependencies": {}, 49 | "directories": {}, 50 | "dist": { 51 | "shasum": "b02fa4816eef21a8c4b35ca9e52921ffc89a30e9", 52 | "tarball": "https://registry.npmjs.org/keygrip/-/keygrip-1.0.1.tgz" 53 | }, 54 | "engines": { 55 | "node": "*" 56 | }, 57 | "homepage": "https://github.com/expressjs/keygrip", 58 | "maintainers": [ 59 | { 60 | "name": "jed", 61 | "email": "tr@nslator.jp" 62 | } 63 | ], 64 | "name": "keygrip", 65 | "optionalDependencies": {}, 66 | "readme": "ERROR: No README data found!", 67 | "repository": { 68 | "type": "git", 69 | "url": "git://github.com/expressjs/keygrip.git" 70 | }, 71 | "scripts": { 72 | "test": "node test.js" 73 | }, 74 | "version": "1.0.1" 75 | } 76 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/keygrip/test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | // ./test.js 4 | var assert = require("assert") 5 | , Keygrip = require("./") 6 | , keylist, keys, hash, index 7 | 8 | // keygrip takes an array of keys. If missing or empty, it will throw. 9 | assert.throws(function() { 10 | keys = new Keygrip(/* empty list */); 11 | }, /must be provided/); 12 | 13 | // Randomly generated key - don't use this for something real. Don't be that person. 14 | keys = new Keygrip(['06ae66fdc6c2faf5a401b70e0bf885cb']); 15 | 16 | // .sign returns the hash for the first key 17 | // all hashes are SHA1 HMACs in url-safe base64 18 | hash = keys.sign("bieberschnitzel") 19 | assert.ok(/^[\w\-]{27}$/.test(hash)) 20 | 21 | 22 | // but we're going to use our list. 23 | // (note that the 'new' operator is optional) 24 | keylist = ["SEKRIT3", "SEKRIT2", "SEKRIT1"] // keylist will be modified in place, so don't reuse 25 | keys = Keygrip(keylist) 26 | testKeygripInstance(keys); 27 | 28 | 29 | // now pass in a different hmac algorithm and encoding 30 | keylist = ["Newest", "AnotherKey", "Oldest"] 31 | keys = Keygrip(keylist, "sha256", "hex") 32 | testKeygripInstance(keys); 33 | 34 | 35 | 36 | function testKeygripInstance(keys) { 37 | hash = keys.sign("bieberschnitzel") 38 | 39 | // .index returns the index of the first matching key 40 | index = keys.index("bieberschnitzel", hash) 41 | assert.equal(index, 0) 42 | 43 | // .verify returns the a boolean indicating a matched key 44 | var matched = keys.verify("bieberschnitzel", hash) 45 | assert.ok(matched) 46 | 47 | index = keys.index("bieberschnitzel", "o_O") 48 | assert.equal(index, -1) 49 | 50 | // rotate a new key in, and an old key out 51 | keylist.unshift("SEKRIT4") 52 | keylist.pop() 53 | 54 | // if index > 0, it's time to re-sign 55 | index = keys.index("bieberschnitzel", hash) 56 | assert.equal(index, 1) 57 | hash = keys.sign("bieberschnitzel") 58 | } -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/koa-compose/History.md: -------------------------------------------------------------------------------- 1 | 2 | 2.5.1 / 2016-10-26 3 | ================== 4 | 5 | * reverts variadic support #64, an unintended breaking change 6 | 7 | 2.5.0 / 2016-10-25 8 | ================== 9 | 10 | * add variadic support #64 11 | 12 | 2.4.0 / 2016-03-03 13 | ================== 14 | 15 | * return the latest value 16 | 17 | 2.3.0 / 2014-05-01 18 | ================== 19 | 20 | * remove instrumentation 21 | 22 | 2.2.0 / 2014-01-22 23 | ================== 24 | 25 | * add `fn._name` for debugging 26 | 27 | 2.1.0 / 2013-12-22 28 | ================== 29 | 30 | * add debugging support 31 | * improve performance ~15% 32 | 33 | 2.0.1 / 2013-12-21 34 | ================== 35 | 36 | * update co to v3 37 | * use generator delegation 38 | 39 | 2.0.0 / 2013-11-07 40 | ================== 41 | 42 | * change middleware signature expected 43 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/koa-compose/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | # koa-compose [![Build Status](https://travis-ci.org/koajs/compose.png)](https://travis-ci.org/koajs/compose) 3 | 4 | Compose middleware. 5 | 6 | ## Installation 7 | 8 | ```js 9 | $ npm install koa-compose 10 | ``` 11 | 12 | ## API 13 | 14 | ### compose([a, b, c, ...]) 15 | 16 | Compose the given middleware and return middleware. 17 | 18 | ## License 19 | 20 | MIT 21 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/koa-compose/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Expose compositor. 4 | */ 5 | 6 | module.exports = compose; 7 | 8 | /** 9 | * Compose `middleware` returning 10 | * a fully valid middleware comprised 11 | * of all those which are passed. 12 | * 13 | * @param {Array} middleware 14 | * @return {Function} 15 | * @api public 16 | */ 17 | 18 | function compose(middleware){ 19 | return function *(next){ 20 | if (!next) next = noop(); 21 | 22 | var i = middleware.length; 23 | 24 | while (i--) { 25 | next = middleware[i].call(this, next); 26 | } 27 | 28 | return yield *next; 29 | } 30 | } 31 | 32 | /** 33 | * Noop. 34 | * 35 | * @api private 36 | */ 37 | 38 | function *noop(){} 39 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/koa-is-json/.npmignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | 10 | # Packages # 11 | ############ 12 | # it's better to unpack these files and commit the raw source 13 | # git has its own built in compression methods 14 | *.7z 15 | *.dmg 16 | *.gz 17 | *.iso 18 | *.jar 19 | *.rar 20 | *.tar 21 | *.zip 22 | 23 | # Logs and databases # 24 | ###################### 25 | *.log 26 | *.sql 27 | *.sqlite 28 | 29 | # OS generated files # 30 | ###################### 31 | .DS_Store* 32 | ehthumbs.db 33 | Icon? 34 | Thumbs.db 35 | 36 | # Node.js # 37 | ########### 38 | lib-cov 39 | *.seed 40 | *.log 41 | *.csv 42 | *.dat 43 | *.out 44 | *.pid 45 | *.gz 46 | 47 | pids 48 | logs 49 | results 50 | 51 | node_modules 52 | npm-debug.log 53 | 54 | # Components # 55 | ############## 56 | 57 | /build 58 | /components 59 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/koa-is-json/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/koa-is-json/README.md: -------------------------------------------------------------------------------- 1 | # Koa Is JSON 2 | 3 | Check if a body is JSON 4 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/koa-is-json/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = isJSON; 3 | 4 | /** 5 | * Check if `body` should be interpreted as json. 6 | */ 7 | 8 | function isJSON(body) { 9 | if (!body) return false; 10 | if ('string' == typeof body) return false; 11 | if ('function' == typeof body.pipe) return false; 12 | if (Buffer.isBuffer(body)) return false; 13 | return true; 14 | } 15 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/koa-is-json/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "koa-is-json@^1.0.0", 6 | "scope": null, 7 | "escapedName": "koa-is-json", 8 | "name": "koa-is-json", 9 | "rawSpec": "^1.0.0", 10 | "spec": ">=1.0.0 <2.0.0", 11 | "type": "range" 12 | }, 13 | "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/koa" 14 | ] 15 | ], 16 | "_from": "koa-is-json@>=1.0.0 <2.0.0", 17 | "_id": "koa-is-json@1.0.0", 18 | "_inCache": true, 19 | "_location": "/koa-is-json", 20 | "_npmUser": { 21 | "name": "jongleberry", 22 | "email": "jonathanrichardong@gmail.com" 23 | }, 24 | "_npmVersion": "1.4.6", 25 | "_phantomChildren": {}, 26 | "_requested": { 27 | "raw": "koa-is-json@^1.0.0", 28 | "scope": null, 29 | "escapedName": "koa-is-json", 30 | "name": "koa-is-json", 31 | "rawSpec": "^1.0.0", 32 | "spec": ">=1.0.0 <2.0.0", 33 | "type": "range" 34 | }, 35 | "_requiredBy": [ 36 | "/koa" 37 | ], 38 | "_resolved": "https://registry.npmjs.org/koa-is-json/-/koa-is-json-1.0.0.tgz", 39 | "_shasum": "273c07edcdcb8df6a2c1ab7d59ee76491451ec14", 40 | "_shrinkwrap": null, 41 | "_spec": "koa-is-json@^1.0.0", 42 | "_where": "/Users/peckn/Documents/Code/node-to-container/1-no-container/node_modules/koa", 43 | "author": { 44 | "name": "Jonathan Ong", 45 | "email": "me@jongleberry.com", 46 | "url": "http://jongleberry.com" 47 | }, 48 | "bugs": { 49 | "url": "https://github.com/koajs/is-json/issues" 50 | }, 51 | "dependencies": {}, 52 | "description": "check if a koa body should be interpreted as JSON", 53 | "devDependencies": {}, 54 | "directories": {}, 55 | "dist": { 56 | "shasum": "273c07edcdcb8df6a2c1ab7d59ee76491451ec14", 57 | "tarball": "https://registry.npmjs.org/koa-is-json/-/koa-is-json-1.0.0.tgz" 58 | }, 59 | "homepage": "https://github.com/koajs/is-json", 60 | "license": "MIT", 61 | "maintainers": [ 62 | { 63 | "name": "jongleberry", 64 | "email": "jonathanrichardong@gmail.com" 65 | } 66 | ], 67 | "name": "koa-is-json", 68 | "optionalDependencies": {}, 69 | "readme": "ERROR: No README data found!", 70 | "repository": { 71 | "type": "git", 72 | "url": "git://github.com/koajs/is-json.git" 73 | }, 74 | "version": "1.0.0" 75 | } 76 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/koa-router/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Alexander C. Mingoia 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/koa-router/lib/README_tpl.hbs: -------------------------------------------------------------------------------- 1 | # koa-router 2 | 3 | [![NPM version](http://img.shields.io/npm/v/koa-router.svg?style=flat)](https://npmjs.org/package/koa-router) [![NPM Downloads](https://img.shields.io/npm/dm/koa-router.svg?style=flat)](https://npmjs.org/package/koa-router) [![Node.js Version](https://img.shields.io/node/v/koa-router.svg?style=flat)](http://nodejs.org/download/) [![Build Status](http://img.shields.io/travis/alexmingoia/koa-router.svg?style=flat)](http://travis-ci.org/alexmingoia/koa-router) [![Tips](https://img.shields.io/gratipay/alexmingoia.svg?style=flat)](https://www.gratipay.com/alexmingoia/) [![Gitter Chat](https://img.shields.io/badge/gitter-join%20chat-1dce73.svg?style=flat)](https://gitter.im/alexmingoia/koa-router/) 4 | 5 | > Router middleware for [koa](https://github.com/koajs/koa) 6 | 7 | * Express-style routing using `app.get`, `app.put`, `app.post`, etc. 8 | * Named URL parameters. 9 | * Named routes with URL generation. 10 | * Responds to `OPTIONS` requests with allowed methods. 11 | * Support for `405 Method Not Allowed` and `501 Not Implemented`. 12 | * Multiple route middleware. 13 | * Multiple routers. 14 | * Nestable routers. 15 | * ES7 async/await support. 16 | 17 | {{#module name="koa-router"}}{{>body}}{{/module}}## Installation 18 | 19 | Install using [npm](https://www.npmjs.org/): 20 | 21 | ```sh 22 | npm install koa-router 23 | ``` 24 | 25 | ## API Reference 26 | {{#module name="koa-router"~}} 27 | {{>body~}} 28 | {{>member-index~}} 29 | {{>members~}} 30 | {{/module~}} 31 | 32 | ## Contributing 33 | 34 | Please submit all issues and pull requests to the [alexmingoia/koa-router](http://github.com/alexmingoia/koa-router) repository! 35 | 36 | ## Tests 37 | 38 | Run tests using `npm test`. 39 | 40 | ## Support 41 | 42 | If you have any problem or suggestion please open an issue [here](https://github.com/alexmingoia/koa-router/issues). 43 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/koa/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2016 Koa contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/media-typer/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.3.0 / 2014-09-07 2 | ================== 3 | 4 | * Support Node.js 0.6 5 | * Throw error when parameter format invalid on parse 6 | 7 | 0.2.0 / 2014-06-18 8 | ================== 9 | 10 | * Add `typer.format()` to format media types 11 | 12 | 0.1.0 / 2014-06-17 13 | ================== 14 | 15 | * Accept `req` as argument to `parse` 16 | * Accept `res` as argument to `parse` 17 | * Parse media type with extra LWS between type and first parameter 18 | 19 | 0.0.0 / 2014-06-13 20 | ================== 21 | 22 | * Initial implementation 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/media-typer/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/methods/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.1.2 / 2016-01-17 2 | ================== 3 | 4 | * perf: enable strict mode 5 | 6 | 1.1.1 / 2014-12-30 7 | ================== 8 | 9 | * Improve `browserify` support 10 | 11 | 1.1.0 / 2014-07-05 12 | ================== 13 | 14 | * Add `CONNECT` method 15 | 16 | 1.0.1 / 2014-06-02 17 | ================== 18 | 19 | * Fix module to work with harmony transform 20 | 21 | 1.0.0 / 2014-05-08 22 | ================== 23 | 24 | * Add `PURGE` method 25 | 26 | 0.1.0 / 2013-10-28 27 | ================== 28 | 29 | * Add `http.METHODS` support 30 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/methods/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2013-2014 TJ Holowaychuk 4 | Copyright (c) 2015-2016 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/methods/README.md: -------------------------------------------------------------------------------- 1 | # Methods 2 | 3 | [![NPM Version][npm-image]][npm-url] 4 | [![NPM Downloads][downloads-image]][downloads-url] 5 | [![Node.js Version][node-version-image]][node-version-url] 6 | [![Build Status][travis-image]][travis-url] 7 | [![Test Coverage][coveralls-image]][coveralls-url] 8 | 9 | HTTP verbs that Node.js core's HTTP parser supports. 10 | 11 | This module provides an export that is just like `http.METHODS` from Node.js core, 12 | with the following differences: 13 | 14 | * All method names are lower-cased. 15 | * Contains a fallback list of methods for Node.js versions that do not have a 16 | `http.METHODS` export (0.10 and lower). 17 | * Provides the fallback list when using tools like `browserify` without pulling 18 | in the `http` shim module. 19 | 20 | ## Install 21 | 22 | ```bash 23 | $ npm install methods 24 | ``` 25 | 26 | ## API 27 | 28 | ```js 29 | var methods = require('methods') 30 | ``` 31 | 32 | ### methods 33 | 34 | This is an array of lower-cased method names that Node.js supports. If Node.js 35 | provides the `http.METHODS` export, then this is the same array lower-cased, 36 | otherwise it is a snapshot of the verbs from Node.js 0.10. 37 | 38 | ## License 39 | 40 | [MIT](LICENSE) 41 | 42 | [npm-image]: https://img.shields.io/npm/v/methods.svg?style=flat 43 | [npm-url]: https://npmjs.org/package/methods 44 | [node-version-image]: https://img.shields.io/node/v/methods.svg?style=flat 45 | [node-version-url]: https://nodejs.org/en/download/ 46 | [travis-image]: https://img.shields.io/travis/jshttp/methods.svg?style=flat 47 | [travis-url]: https://travis-ci.org/jshttp/methods 48 | [coveralls-image]: https://img.shields.io/coveralls/jshttp/methods.svg?style=flat 49 | [coveralls-url]: https://coveralls.io/r/jshttp/methods?branch=master 50 | [downloads-image]: https://img.shields.io/npm/dm/methods.svg?style=flat 51 | [downloads-url]: https://npmjs.org/package/methods 52 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/methods/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * methods 3 | * Copyright(c) 2013-2014 TJ Holowaychuk 4 | * Copyright(c) 2015-2016 Douglas Christopher Wilson 5 | * MIT Licensed 6 | */ 7 | 8 | 'use strict'; 9 | 10 | /** 11 | * Module dependencies. 12 | * @private 13 | */ 14 | 15 | var http = require('http'); 16 | 17 | /** 18 | * Module exports. 19 | * @public 20 | */ 21 | 22 | module.exports = getCurrentNodeMethods() || getBasicNodeMethods(); 23 | 24 | /** 25 | * Get the current Node.js methods. 26 | * @private 27 | */ 28 | 29 | function getCurrentNodeMethods() { 30 | return http.METHODS && http.METHODS.map(function lowerCaseMethod(method) { 31 | return method.toLowerCase(); 32 | }); 33 | } 34 | 35 | /** 36 | * Get the "basic" Node.js methods, a snapshot from Node.js 0.10. 37 | * @private 38 | */ 39 | 40 | function getBasicNodeMethods() { 41 | return [ 42 | 'get', 43 | 'post', 44 | 'put', 45 | 'head', 46 | 'delete', 47 | 'options', 48 | 'trace', 49 | 'copy', 50 | 'lock', 51 | 'mkcol', 52 | 'move', 53 | 'purge', 54 | 'propfind', 55 | 'proppatch', 56 | 'unlock', 57 | 'report', 58 | 'mkactivity', 59 | 'checkout', 60 | 'merge', 61 | 'm-search', 62 | 'notify', 63 | 'subscribe', 64 | 'unsubscribe', 65 | 'patch', 66 | 'search', 67 | 'connect' 68 | ]; 69 | } 70 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/mime-db/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/mime-db/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * mime-db 3 | * Copyright(c) 2014 Jonathan Ong 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module exports. 9 | */ 10 | 11 | module.exports = require('./db.json') 12 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/mime-types/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Jonathan Ong 4 | Copyright (c) 2015 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/ms/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Zeit, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/ms/README.md: -------------------------------------------------------------------------------- 1 | # ms 2 | 3 | [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) 4 | [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) 5 | [![Slack Channel](https://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) 6 | 7 | Use this package to easily convert various time formats to milliseconds. 8 | 9 | ## Examples 10 | 11 | ```js 12 | ms('2 days') // 172800000 13 | ms('1d') // 86400000 14 | ms('10h') // 36000000 15 | ms('2.5 hrs') // 9000000 16 | ms('2h') // 7200000 17 | ms('1m') // 60000 18 | ms('5s') // 5000 19 | ms('1y') // 31557600000 20 | ms('100') // 100 21 | ``` 22 | 23 | ### Convert from milliseconds 24 | 25 | ```js 26 | ms(60000) // "1m" 27 | ms(2 * 60000) // "2m" 28 | ms(ms('10 hours')) // "10h" 29 | ``` 30 | 31 | ### Time format written-out 32 | 33 | ```js 34 | ms(60000, { long: true }) // "1 minute" 35 | ms(2 * 60000, { long: true }) // "2 minutes" 36 | ms(ms('10 hours'), { long: true }) // "10 hours" 37 | ``` 38 | 39 | ## Features 40 | 41 | - Works both in [node](https://nodejs.org) and in the browser. 42 | - If a number is supplied to `ms`, a string with a unit is returned. 43 | - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). 44 | - If you pass a string with a number and a valid unit, the number of equivalent ms is returned. 45 | 46 | ## Caught a bug? 47 | 48 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device 49 | 2. Link the package to the global module directory: `npm link` 50 | 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! 51 | 52 | As always, you can run the tests using: `npm test` 53 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/negotiator/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012-2014 Federico Romero 4 | Copyright (c) 2012-2014 Isaac Z. Schlueter 5 | Copyright (c) 2014-2015 Douglas Christopher Wilson 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | 'Software'), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/on-finished/HISTORY.md: -------------------------------------------------------------------------------- 1 | 2.3.0 / 2015-05-26 2 | ================== 3 | 4 | * Add defined behavior for HTTP `CONNECT` requests 5 | * Add defined behavior for HTTP `Upgrade` requests 6 | * deps: ee-first@1.1.1 7 | 8 | 2.2.1 / 2015-04-22 9 | ================== 10 | 11 | * Fix `isFinished(req)` when data buffered 12 | 13 | 2.2.0 / 2014-12-22 14 | ================== 15 | 16 | * Add message object to callback arguments 17 | 18 | 2.1.1 / 2014-10-22 19 | ================== 20 | 21 | * Fix handling of pipelined requests 22 | 23 | 2.1.0 / 2014-08-16 24 | ================== 25 | 26 | * Check if `socket` is detached 27 | * Return `undefined` for `isFinished` if state unknown 28 | 29 | 2.0.0 / 2014-08-16 30 | ================== 31 | 32 | * Add `isFinished` function 33 | * Move to `jshttp` organization 34 | * Remove support for plain socket argument 35 | * Rename to `on-finished` 36 | * Support both `req` and `res` as arguments 37 | * deps: ee-first@1.0.5 38 | 39 | 1.2.2 / 2014-06-10 40 | ================== 41 | 42 | * Reduce listeners added to emitters 43 | - avoids "event emitter leak" warnings when used multiple times on same request 44 | 45 | 1.2.1 / 2014-06-08 46 | ================== 47 | 48 | * Fix returned value when already finished 49 | 50 | 1.2.0 / 2014-06-05 51 | ================== 52 | 53 | * Call callback when called on already-finished socket 54 | 55 | 1.1.4 / 2014-05-27 56 | ================== 57 | 58 | * Support node.js 0.8 59 | 60 | 1.1.3 / 2014-04-30 61 | ================== 62 | 63 | * Make sure errors passed as instanceof `Error` 64 | 65 | 1.1.2 / 2014-04-18 66 | ================== 67 | 68 | * Default the `socket` to passed-in object 69 | 70 | 1.1.1 / 2014-01-16 71 | ================== 72 | 73 | * Rename module to `finished` 74 | 75 | 1.1.0 / 2013-12-25 76 | ================== 77 | 78 | * Call callback when called on already-errored socket 79 | 80 | 1.0.1 / 2013-12-20 81 | ================== 82 | 83 | * Actually pass the error to the callback 84 | 85 | 1.0.0 / 2013-12-20 86 | ================== 87 | 88 | * Initial release 89 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/on-finished/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2013 Jonathan Ong 4 | Copyright (c) 2014 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/only/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/only/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.0.1 / 2010-01-03 3 | ================== 4 | 5 | * Initial release 6 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/only/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --require should \ 5 | --reporter spec 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/only/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | # only 3 | 4 | Return whitelisted properties of an object. 5 | 6 | ## Installation 7 | 8 | $ npm install only 9 | 10 | ## API 11 | 12 | An array or space-delimited string may be given: 13 | 14 | ```js 15 | var obj = { 16 | name: 'tobi', 17 | last: 'holowaychuk', 18 | email: 'tobi@learnboost.com', 19 | _id: '12345' 20 | }; 21 | 22 | var user = only(obj, 'name last email'); 23 | ``` 24 | 25 | yields: 26 | 27 | ```js 28 | { 29 | name: 'tobi', 30 | last: 'holowaychuk', 31 | email: 'tobi@learnboost.com' 32 | } 33 | ``` 34 | 35 | ## License 36 | 37 | (The MIT License) 38 | 39 | Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> 40 | 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of this software and associated documentation files (the 43 | 'Software'), to deal in the Software without restriction, including 44 | without limitation the rights to use, copy, modify, merge, publish, 45 | distribute, sublicense, and/or sell copies of the Software, and to 46 | permit persons to whom the Software is furnished to do so, subject to 47 | the following conditions: 48 | 49 | The above copyright notice and this permission notice shall be 50 | included in all copies or substantial portions of the Software. 51 | 52 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 53 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 54 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 55 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 56 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 57 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 58 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/only/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = function(obj, keys){ 3 | obj = obj || {}; 4 | if ('string' == typeof keys) keys = keys.split(/ +/); 5 | return keys.reduce(function(ret, key){ 6 | if (null == obj[key]) return ret; 7 | ret[key] = obj[key]; 8 | return ret; 9 | }, {}); 10 | }; 11 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/parseurl/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.3.1 / 2016-01-17 2 | ================== 3 | 4 | * perf: enable strict mode 5 | 6 | 1.3.0 / 2014-08-09 7 | ================== 8 | 9 | * Add `parseurl.original` for parsing `req.originalUrl` with fallback 10 | * Return `undefined` if `req.url` is `undefined` 11 | 12 | 1.2.0 / 2014-07-21 13 | ================== 14 | 15 | * Cache URLs based on original value 16 | * Remove no-longer-needed URL mis-parse work-around 17 | * Simplify the "fast-path" `RegExp` 18 | 19 | 1.1.3 / 2014-07-08 20 | ================== 21 | 22 | * Fix typo 23 | 24 | 1.1.2 / 2014-07-08 25 | ================== 26 | 27 | * Seriously fix Node.js 0.8 compatibility 28 | 29 | 1.1.1 / 2014-07-08 30 | ================== 31 | 32 | * Fix Node.js 0.8 compatibility 33 | 34 | 1.1.0 / 2014-07-08 35 | ================== 36 | 37 | * Incorporate URL href-only parse fast-path 38 | 39 | 1.0.1 / 2014-03-08 40 | ================== 41 | 42 | * Add missing `require` 43 | 44 | 1.0.0 / 2014-03-08 45 | ================== 46 | 47 | * Genesis from `connect` 48 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/parseurl/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | (The MIT License) 3 | 4 | Copyright (c) 2014 Jonathan Ong 5 | Copyright (c) 2014 Douglas Christopher Wilson 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | 'Software'), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/path-to-regexp/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/path-to-regexp/index.d.ts: -------------------------------------------------------------------------------- 1 | declare function pathToRegexp (path: pathToRegexp.Path, options?: pathToRegexp.RegExpOptions & pathToRegexp.ParseOptions): pathToRegexp.PathRegExp; 2 | declare function pathToRegexp (path: pathToRegexp.Path, keys?: pathToRegexp.Key[], options?: pathToRegexp.RegExpOptions & pathToRegexp.ParseOptions): pathToRegexp.PathRegExp; 3 | 4 | declare namespace pathToRegexp { 5 | export interface PathRegExp extends RegExp { 6 | // An array to be populated with the keys found in the path. 7 | keys: Key[]; 8 | } 9 | 10 | export interface RegExpOptions { 11 | /** 12 | * When `true` the route will be case sensitive. (default: `false`) 13 | */ 14 | sensitive?: boolean; 15 | /** 16 | * When `false` the trailing slash is optional. (default: `false`) 17 | */ 18 | strict?: boolean; 19 | /** 20 | * When `false` the path will match at the beginning. (default: `true`) 21 | */ 22 | end?: boolean; 23 | /** 24 | * Sets the final character for non-ending optimistic matches. (default: `/`) 25 | */ 26 | delimiter?: string; 27 | } 28 | 29 | export interface ParseOptions { 30 | /** 31 | * Set the default delimiter for repeat parameters. (default: `'/'`) 32 | */ 33 | delimiter?: string; 34 | } 35 | 36 | /** 37 | * Parse an Express-style path into an array of tokens. 38 | */ 39 | export function parse (path: string, options?: ParseOptions): Token[]; 40 | 41 | /** 42 | * Transforming an Express-style path into a valid path. 43 | */ 44 | export function compile (path: string, options?: ParseOptions): PathFunction; 45 | 46 | /** 47 | * Transform an array of tokens into a path generator function. 48 | */ 49 | export function tokensToFunction (tokens: Token[]): PathFunction; 50 | 51 | /** 52 | * Transform an array of tokens into a matching regular expression. 53 | */ 54 | export function tokensToRegExp (tokens: Token[], options?: RegExpOptions): PathRegExp; 55 | export function tokensToRegExp (tokens: Token[], keys?: Key[], options?: RegExpOptions): PathRegExp; 56 | 57 | export interface Key { 58 | name: string | number; 59 | prefix: string; 60 | delimiter: string; 61 | optional: boolean; 62 | repeat: boolean; 63 | pattern: string; 64 | partial: boolean; 65 | asterisk: boolean; 66 | } 67 | 68 | interface PathFunctionOptions { 69 | pretty?: boolean; 70 | } 71 | 72 | export type Token = string | Key; 73 | export type Path = string | RegExp | Array; 74 | export type PathFunction = (data?: Object, options?: PathFunctionOptions) => string; 75 | } 76 | 77 | export = pathToRegexp; 78 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/setprototypeof/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Wes Todd 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 10 | SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 12 | OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 13 | CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/setprototypeof/README.md: -------------------------------------------------------------------------------- 1 | # Polyfill for `Object.setPrototypeOf` 2 | 3 | A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8. 4 | 5 | ## Usage: 6 | 7 | ``` 8 | $ npm install --save setprototypeof 9 | ``` 10 | 11 | ```javascript 12 | var setPrototypeOf = require('setprototypeof'); 13 | 14 | var obj = {}; 15 | setPrototypeOf(obj, { 16 | foo: function() { 17 | return 'bar'; 18 | } 19 | }); 20 | obj.foo(); // bar 21 | ``` 22 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/setprototypeof/index.js: -------------------------------------------------------------------------------- 1 | module.exports = Object.setPrototypeOf || ({__proto__:[]} instanceof Array ? setProtoOf : mixinProperties); 2 | 3 | function setProtoOf(obj, proto) { 4 | obj.__proto__ = proto; 5 | return obj; 6 | } 7 | 8 | function mixinProperties(obj, proto) { 9 | for (var prop in proto) { 10 | if (!obj.hasOwnProperty(prop)) { 11 | obj[prop] = proto[prop]; 12 | } 13 | } 14 | return obj; 15 | } 16 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/statuses/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.3.1 / 2016-11-11 2 | ================== 3 | 4 | * Fix return type in JSDoc 5 | 6 | 1.3.0 / 2016-05-17 7 | ================== 8 | 9 | * Add `421 Misdirected Request` 10 | * perf: enable strict mode 11 | 12 | 1.2.1 / 2015-02-01 13 | ================== 14 | 15 | * Fix message for status 451 16 | - `451 Unavailable For Legal Reasons` 17 | 18 | 1.2.0 / 2014-09-28 19 | ================== 20 | 21 | * Add `208 Already Repored` 22 | * Add `226 IM Used` 23 | * Add `306 (Unused)` 24 | * Add `415 Unable For Legal Reasons` 25 | * Add `508 Loop Detected` 26 | 27 | 1.1.1 / 2014-09-24 28 | ================== 29 | 30 | * Add missing 308 to `codes.json` 31 | 32 | 1.1.0 / 2014-09-21 33 | ================== 34 | 35 | * Add `codes.json` for universal support 36 | 37 | 1.0.4 / 2014-08-20 38 | ================== 39 | 40 | * Package cleanup 41 | 42 | 1.0.3 / 2014-06-08 43 | ================== 44 | 45 | * Add 308 to `.redirect` category 46 | 47 | 1.0.2 / 2014-03-13 48 | ================== 49 | 50 | * Add `.retry` category 51 | 52 | 1.0.1 / 2014-03-12 53 | ================== 54 | 55 | * Initial release 56 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/statuses/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/statuses/codes.json: -------------------------------------------------------------------------------- 1 | { 2 | "100": "Continue", 3 | "101": "Switching Protocols", 4 | "102": "Processing", 5 | "200": "OK", 6 | "201": "Created", 7 | "202": "Accepted", 8 | "203": "Non-Authoritative Information", 9 | "204": "No Content", 10 | "205": "Reset Content", 11 | "206": "Partial Content", 12 | "207": "Multi-Status", 13 | "208": "Already Reported", 14 | "226": "IM Used", 15 | "300": "Multiple Choices", 16 | "301": "Moved Permanently", 17 | "302": "Found", 18 | "303": "See Other", 19 | "304": "Not Modified", 20 | "305": "Use Proxy", 21 | "306": "(Unused)", 22 | "307": "Temporary Redirect", 23 | "308": "Permanent Redirect", 24 | "400": "Bad Request", 25 | "401": "Unauthorized", 26 | "402": "Payment Required", 27 | "403": "Forbidden", 28 | "404": "Not Found", 29 | "405": "Method Not Allowed", 30 | "406": "Not Acceptable", 31 | "407": "Proxy Authentication Required", 32 | "408": "Request Timeout", 33 | "409": "Conflict", 34 | "410": "Gone", 35 | "411": "Length Required", 36 | "412": "Precondition Failed", 37 | "413": "Payload Too Large", 38 | "414": "URI Too Long", 39 | "415": "Unsupported Media Type", 40 | "416": "Range Not Satisfiable", 41 | "417": "Expectation Failed", 42 | "418": "I'm a teapot", 43 | "421": "Misdirected Request", 44 | "422": "Unprocessable Entity", 45 | "423": "Locked", 46 | "424": "Failed Dependency", 47 | "425": "Unordered Collection", 48 | "426": "Upgrade Required", 49 | "428": "Precondition Required", 50 | "429": "Too Many Requests", 51 | "431": "Request Header Fields Too Large", 52 | "451": "Unavailable For Legal Reasons", 53 | "500": "Internal Server Error", 54 | "501": "Not Implemented", 55 | "502": "Bad Gateway", 56 | "503": "Service Unavailable", 57 | "504": "Gateway Timeout", 58 | "505": "HTTP Version Not Supported", 59 | "506": "Variant Also Negotiates", 60 | "507": "Insufficient Storage", 61 | "508": "Loop Detected", 62 | "509": "Bandwidth Limit Exceeded", 63 | "510": "Not Extended", 64 | "511": "Network Authentication Required" 65 | } -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/statuses/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * statuses 3 | * Copyright(c) 2014 Jonathan Ong 4 | * Copyright(c) 2016 Douglas Christopher Wilson 5 | * MIT Licensed 6 | */ 7 | 8 | 'use strict' 9 | 10 | /** 11 | * Module dependencies. 12 | * @private 13 | */ 14 | 15 | var codes = require('./codes.json') 16 | 17 | /** 18 | * Module exports. 19 | * @public 20 | */ 21 | 22 | module.exports = status 23 | 24 | // array of status codes 25 | status.codes = populateStatusesMap(status, codes) 26 | 27 | // status codes for redirects 28 | status.redirect = { 29 | 300: true, 30 | 301: true, 31 | 302: true, 32 | 303: true, 33 | 305: true, 34 | 307: true, 35 | 308: true 36 | } 37 | 38 | // status codes for empty bodies 39 | status.empty = { 40 | 204: true, 41 | 205: true, 42 | 304: true 43 | } 44 | 45 | // status codes for when you should retry the request 46 | status.retry = { 47 | 502: true, 48 | 503: true, 49 | 504: true 50 | } 51 | 52 | /** 53 | * Populate the statuses map for given codes. 54 | * @private 55 | */ 56 | 57 | function populateStatusesMap (statuses, codes) { 58 | var arr = [] 59 | 60 | Object.keys(codes).forEach(function forEachCode (code) { 61 | var message = codes[code] 62 | var status = Number(code) 63 | 64 | // Populate properties 65 | statuses[status] = message 66 | statuses[message] = status 67 | statuses[message.toLowerCase()] = status 68 | 69 | // Add to array 70 | arr.push(status) 71 | }) 72 | 73 | return arr 74 | } 75 | 76 | /** 77 | * Get the status code. 78 | * 79 | * Given a number, this will throw if it is not a known status 80 | * code, otherwise the code will be returned. Given a string, 81 | * the string will be parsed for a number and return the code 82 | * if valid, otherwise will lookup the code assuming this is 83 | * the status message. 84 | * 85 | * @param {string|number} code 86 | * @returns {number} 87 | * @public 88 | */ 89 | 90 | function status (code) { 91 | if (typeof code === 'number') { 92 | if (!status[code]) throw new Error('invalid status code: ' + code) 93 | return code 94 | } 95 | 96 | if (typeof code !== 'string') { 97 | throw new TypeError('code must be a number or string') 98 | } 99 | 100 | // '403' 101 | var n = parseInt(code, 10) 102 | if (!isNaN(n)) { 103 | if (!status[n]) throw new Error('invalid status code: ' + n) 104 | return n 105 | } 106 | 107 | n = status[code.toLowerCase()] 108 | if (!n) throw new Error('invalid status message: "' + code + '"') 109 | return n 110 | } 111 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/type-is/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Jonathan Ong 4 | Copyright (c) 2014-2015 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/vary/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.1.0 / 2015-09-29 2 | ================== 3 | 4 | * Only accept valid field names in the `field` argument 5 | - Ensures the resulting string is a valid HTTP header value 6 | 7 | 1.0.1 / 2015-07-08 8 | ================== 9 | 10 | * Fix setting empty header from empty `field` 11 | * perf: enable strict mode 12 | * perf: remove argument reassignments 13 | 14 | 1.0.0 / 2014-08-10 15 | ================== 16 | 17 | * Accept valid `Vary` header string as `field` 18 | * Add `vary.append` for low-level string manipulation 19 | * Move to `jshttp` orgainzation 20 | 21 | 0.1.0 / 2014-06-05 22 | ================== 23 | 24 | * Support array of fields to set 25 | 26 | 0.0.0 / 2014-06-04 27 | ================== 28 | 29 | * Initial release 30 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/node_modules/vary/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014-2015 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "koa": "^1.2.5", 4 | "koa-router": "^5.4.0" 5 | }, 6 | "scripts": { 7 | "start": "node index.js" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/code/server.js: -------------------------------------------------------------------------------- 1 | const app = require('koa')(); 2 | const router = require('koa-router')(); 3 | const db = require('./db.json'); 4 | 5 | // Log requests 6 | app.use(function *(next) { 7 | const start = new Date; 8 | yield next; 9 | const ms = new Date - start; 10 | console.log('%s %s - %s', this.method, this.url, ms); 11 | }); 12 | 13 | router.get('/api/characters', function *() { 14 | this.body = db.characters; 15 | }); 16 | 17 | router.get('/api/characters/:id', function *() { 18 | const id = parseInt(this.params.id, 10); 19 | this.body = db.characters.find((character) => character.id === id); 20 | }); 21 | 22 | router.get('/api/locations', function *() { 23 | this.body = db.locations; 24 | }); 25 | 26 | router.get('/api/locations/:id', function *() { 27 | const id = parseInt(this.params.id, 10); 28 | this.body = db.locations.find((location) => location.id === id); 29 | }); 30 | 31 | router.get('/api/characters/by-location/:locationId', function *() { 32 | const id = parseInt(this.params.locationId, 10); 33 | this.body = db.characters.filter((character) => character.location === id); 34 | }); 35 | 36 | router.get('/api/characters/by-gender/:gender', function *() { 37 | const gender = this.params.gender.toLowerCase(); 38 | this.body = db.characters.filter((character) => character.gender === gender); 39 | }); 40 | 41 | router.get('/api/characters/by-species/:species', function *() { 42 | const species = this.params.species.toLowerCase(); 43 | this.body = db.characters.filter((character) => character.species.includes(species)); 44 | }); 45 | 46 | router.get('/api/characters/by-occupation/:occupation', function *() { 47 | const occupation = this.params.occupation.toLowerCase(); 48 | this.body = db.characters.filter((character) => character.occupations.includes(occupation)); 49 | }); 50 | 51 | router.get('/api/', function *() { 52 | this.body = 'API ready to receive requests'; 53 | }); 54 | 55 | router.get('/', function *() { 56 | this.body = 'Ready to receive requests'; 57 | }); 58 | 59 | app.use(router.routes()); 60 | app.use(router.allowedMethods()); 61 | 62 | app.listen(8081); 63 | -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/images/browser-json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/2 - Elastic Beanstalk/images/browser-json.png -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/images/configure-elastic-beanstalk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/2 - Elastic Beanstalk/images/configure-elastic-beanstalk.png -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/images/confirm-termination.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/2 - Elastic Beanstalk/images/confirm-termination.png -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/images/create-environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/2 - Elastic Beanstalk/images/create-environment.png -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/images/delete-application.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/2 - Elastic Beanstalk/images/delete-application.png -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/images/elastic-beanstalk-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/2 - Elastic Beanstalk/images/elastic-beanstalk-architecture.png -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/images/environment-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/2 - Elastic Beanstalk/images/environment-url.png -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/images/terminate-environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/2 - Elastic Beanstalk/images/terminate-environment.png -------------------------------------------------------------------------------- /2 - Elastic Beanstalk/images/termination-events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/2 - Elastic Beanstalk/images/termination-events.png -------------------------------------------------------------------------------- /3 - Serverless Lambda/code/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | jspm_packages 4 | 5 | # Serverless directories 6 | .serverless -------------------------------------------------------------------------------- /3 - Serverless Lambda/code/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "characters": [ 3 | { 4 | "id": 1, 5 | "name": "Marceline Abadeer", 6 | "gender": "female", 7 | "species": [ 8 | "human", 9 | "demon", 10 | "vampire" 11 | ], 12 | "occupations": [ 13 | "queen" 14 | ], 15 | "location": 1 16 | }, 17 | { 18 | "id": 2, 19 | "name": "Finn 'the Human' Mertens", 20 | "gender": "male", 21 | "species": [ 22 | "human" 23 | ], 24 | "occupations": [ 25 | "adventurer", 26 | "hero" 27 | ], 28 | "location": 2 29 | }, 30 | { 31 | "id": 3, 32 | "name": "Bonnibel Bubblegum", 33 | "gender": "female", 34 | "species": [ 35 | "candy elemental" 36 | ], 37 | "occupations": [ 38 | "princess", 39 | "scientist" 40 | ], 41 | "location": 3 42 | }, 43 | { 44 | "id": 4, 45 | "name": "Jake the Dog", 46 | "gender": "male", 47 | "species": [ 48 | "dog", 49 | "shape-shifter" 50 | ], 51 | "occupations": [ 52 | "criminal", 53 | "hero", 54 | "adventurer", 55 | "father" 56 | ], 57 | "location": 2 58 | }, 59 | { 60 | "id": 5, 61 | "name": "BMO", 62 | "gender": "genderless", 63 | "species": [ 64 | "mo" 65 | ], 66 | "occupations": [ 67 | "video game console", 68 | "computer", 69 | "vcr", 70 | "adventurer" 71 | ], 72 | "location": 2 73 | } 74 | ], 75 | 76 | "locations": [ 77 | { 78 | "id": 1, 79 | "name": "The Nightosphere", 80 | "description": "The demon world" 81 | }, 82 | { 83 | "id": 2, 84 | "name": "Tree Fort", 85 | "description": "Home of Finn, Jake, and BMO" 86 | }, 87 | { 88 | "id": 3, 89 | "name": "Candy Kingdom", 90 | "description": "Kingdom made up of and populated by candy people" 91 | } 92 | ] 93 | } 94 | -------------------------------------------------------------------------------- /3 - Serverless Lambda/images/api-gateway.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/3 - Serverless Lambda/images/api-gateway.png -------------------------------------------------------------------------------- /3 - Serverless Lambda/images/function-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/3 - Serverless Lambda/images/function-list.png -------------------------------------------------------------------------------- /3 - Serverless Lambda/images/lambda-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/3 - Serverless Lambda/images/lambda-architecture.png -------------------------------------------------------------------------------- /3 - Serverless Lambda/images/serverless-deploy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/3 - Serverless Lambda/images/serverless-deploy.png -------------------------------------------------------------------------------- /3 - Serverless Lambda/images/serverless-remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/3 - Serverless Lambda/images/serverless-remove.png -------------------------------------------------------------------------------- /4 - Elastic Container Service/code/services/characters/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mhart/alpine-node:7.10.1 2 | 3 | WORKDIR /srv 4 | ADD . . 5 | RUN npm install 6 | 7 | EXPOSE 8081 8 | CMD ["node", "server.js"] 9 | -------------------------------------------------------------------------------- /4 - Elastic Container Service/code/services/characters/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "characters": [ 3 | { 4 | "id": 1, 5 | "name": "Marceline Abadeer", 6 | "gender": "female", 7 | "species": [ 8 | "human", 9 | "demon", 10 | "vampire" 11 | ], 12 | "occupations": [ 13 | "queen" 14 | ], 15 | "location": 1 16 | }, 17 | { 18 | "id": 2, 19 | "name": "Finn 'the Human' Mertens", 20 | "gender": "male", 21 | "species": [ 22 | "human" 23 | ], 24 | "occupations": [ 25 | "adventurer", 26 | "hero" 27 | ], 28 | "location": 2 29 | }, 30 | { 31 | "id": 3, 32 | "name": "Bonnibel Bubblegum", 33 | "gender": "female", 34 | "species": [ 35 | "candy elemental" 36 | ], 37 | "occupations": [ 38 | "princess", 39 | "scientist" 40 | ], 41 | "location": 3 42 | }, 43 | { 44 | "id": 4, 45 | "name": "Jake the Dog", 46 | "gender": "male", 47 | "species": [ 48 | "dog", 49 | "shape-shifter" 50 | ], 51 | "occupations": [ 52 | "criminal", 53 | "hero", 54 | "adventurer", 55 | "father" 56 | ], 57 | "location": 2 58 | }, 59 | { 60 | "id": 5, 61 | "name": "BMO", 62 | "gender": "genderless", 63 | "species": [ 64 | "mo" 65 | ], 66 | "occupations": [ 67 | "video game console", 68 | "computer", 69 | "vcr", 70 | "adventurer" 71 | ], 72 | "location": 2 73 | } 74 | ] 75 | } 76 | -------------------------------------------------------------------------------- /4 - Elastic Container Service/code/services/characters/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "koa": "^1.2.5", 4 | "koa-router": "^5.4.0" 5 | }, 6 | "scripts": { 7 | "start": "node server.js" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /4 - Elastic Container Service/code/services/characters/server.js: -------------------------------------------------------------------------------- 1 | const app = require('koa')(); 2 | const router = require('koa-router')(); 3 | const db = require('./db.json'); 4 | 5 | // Log requests 6 | app.use(function *(next) { 7 | const start = new Date; 8 | yield next; 9 | const ms = new Date - start; 10 | console.log('%s %s - %s', this.method, this.url, ms); 11 | }); 12 | 13 | router.get('/api/characters', function *() { 14 | this.body = db.characters; 15 | }); 16 | 17 | router.get('/api/characters/:id', function *() { 18 | const id = parseInt(this.params.id, 10); 19 | this.body = db.characters.find((character) => character.id === id); 20 | }); 21 | 22 | router.get('/api/characters/by-location/:locationId', function *() { 23 | const id = parseInt(this.params.locationId, 10); 24 | this.body = db.characters.filter((character) => character.location === id); 25 | }); 26 | 27 | router.get('/api/characters/by-gender/:gender', function *() { 28 | const gender = this.params.gender.toLowerCase(); 29 | this.body = db.characters.filter((character) => character.gender === gender); 30 | }); 31 | 32 | router.get('/api/characters/by-species/:species', function *() { 33 | const species = this.params.species.toLowerCase(); 34 | this.body = db.characters.filter((character) => character.species.includes(species)); 35 | }); 36 | 37 | router.get('/api/characters/by-occupation/:occupation', function *() { 38 | const occupation = this.params.occupation.toLowerCase(); 39 | this.body = db.characters.filter((character) => character.occupations.includes(occupation)); 40 | }); 41 | 42 | router.get('/', function *() { 43 | this.body = 'Ready to receive requests'; 44 | }); 45 | 46 | app.use(router.routes()); 47 | app.use(router.allowedMethods()); 48 | 49 | var server = app.listen(8081); 50 | 51 | process.on('SIGTERM', function() { 52 | console.log('Shutting down...'); 53 | server.close(); 54 | }); 55 | 56 | -------------------------------------------------------------------------------- /4 - Elastic Container Service/code/services/locations/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mhart/alpine-node:7.10.1 2 | 3 | WORKDIR /srv 4 | ADD . . 5 | RUN npm install 6 | 7 | EXPOSE 8081 8 | CMD ["node", "server.js"] 9 | -------------------------------------------------------------------------------- /4 - Elastic Container Service/code/services/locations/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "locations": [ 3 | { 4 | "id": 1, 5 | "name": "The Nightosphere", 6 | "description": "The demon world" 7 | }, 8 | { 9 | "id": 2, 10 | "name": "Tree Fort", 11 | "description": "Home of Finn, Jake, and BMO" 12 | }, 13 | { 14 | "id": 3, 15 | "name": "Candy Kingdom", 16 | "description": "Kingdom made up of and populated by candy people" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /4 - Elastic Container Service/code/services/locations/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "koa": "^1.2.5", 4 | "koa-router": "^5.4.0" 5 | }, 6 | "scripts": { 7 | "start": "node server.js" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /4 - Elastic Container Service/code/services/locations/server.js: -------------------------------------------------------------------------------- 1 | const app = require('koa')(); 2 | const router = require('koa-router')(); 3 | const db = require('./db.json'); 4 | 5 | // Log requests 6 | app.use(function *(next) { 7 | const start = new Date; 8 | yield next; 9 | const ms = new Date - start; 10 | console.log('%s %s - %s', this.method, this.url, ms); 11 | }); 12 | 13 | router.get('/api/locations', function *() { 14 | this.body = db.locations; 15 | }); 16 | 17 | router.get('/api/locations/:id', function *() { 18 | const id = parseInt(this.params.id, 10); 19 | this.body = db.locations.find((location) => location.id === id); 20 | }); 21 | 22 | router.get('/api/', function *() { 23 | this.body = 'API ready to receive requests'; 24 | }); 25 | 26 | router.get('/', function *() { 27 | this.body = 'Ready to receive requests'; 28 | }); 29 | 30 | app.use(router.routes()); 31 | app.use(router.allowedMethods()); 32 | 33 | var server = app.listen(8081); 34 | 35 | process.on('SIGTERM', function() { 36 | console.log('Shutting down...'); 37 | server.close(); 38 | }); 39 | -------------------------------------------------------------------------------- /4 - Elastic Container Service/images/cluster-outputs-listener.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/4 - Elastic Container Service/images/cluster-outputs-listener.png -------------------------------------------------------------------------------- /4 - Elastic Container Service/images/cluster-outputs-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/4 - Elastic Container Service/images/cluster-outputs-url.png -------------------------------------------------------------------------------- /4 - Elastic Container Service/images/cluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/4 - Elastic Container Service/images/cluster.png -------------------------------------------------------------------------------- /4 - Elastic Container Service/images/delete-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/4 - Elastic Container Service/images/delete-repository.png -------------------------------------------------------------------------------- /4 - Elastic Container Service/images/delete-stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/4 - Elastic Container Service/images/delete-stack.png -------------------------------------------------------------------------------- /4 - Elastic Container Service/images/ecs-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/4 - Elastic Container Service/images/ecs-architecture.png -------------------------------------------------------------------------------- /4 - Elastic Container Service/images/services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/4 - Elastic Container Service/images/services.png -------------------------------------------------------------------------------- /4 - Elastic Container Service/images/tasks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/4 - Elastic Container Service/images/tasks.png -------------------------------------------------------------------------------- /5 - AWS Fargate/code/characters/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mhart/alpine-node:7.10.1 2 | 3 | WORKDIR /srv 4 | ADD . . 5 | RUN npm install 6 | 7 | EXPOSE 80 8 | CMD ["node", "server.js"] 9 | -------------------------------------------------------------------------------- /5 - AWS Fargate/code/characters/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "characters": [ 3 | { 4 | "id": 1, 5 | "name": "Marceline Abadeer", 6 | "gender": "female", 7 | "species": [ 8 | "human", 9 | "demon", 10 | "vampire" 11 | ], 12 | "occupations": [ 13 | "queen" 14 | ], 15 | "location": 1 16 | }, 17 | { 18 | "id": 2, 19 | "name": "Finn 'the Human' Mertens", 20 | "gender": "male", 21 | "species": [ 22 | "human" 23 | ], 24 | "occupations": [ 25 | "adventurer", 26 | "hero" 27 | ], 28 | "location": 2 29 | }, 30 | { 31 | "id": 3, 32 | "name": "Bonnibel Bubblegum", 33 | "gender": "female", 34 | "species": [ 35 | "candy elemental" 36 | ], 37 | "occupations": [ 38 | "princess", 39 | "scientist" 40 | ], 41 | "location": 3 42 | }, 43 | { 44 | "id": 4, 45 | "name": "Jake the Dog", 46 | "gender": "male", 47 | "species": [ 48 | "dog", 49 | "shape-shifter" 50 | ], 51 | "occupations": [ 52 | "criminal", 53 | "hero", 54 | "adventurer", 55 | "father" 56 | ], 57 | "location": 2 58 | }, 59 | { 60 | "id": 5, 61 | "name": "BMO", 62 | "gender": "genderless", 63 | "species": [ 64 | "mo" 65 | ], 66 | "occupations": [ 67 | "video game console", 68 | "computer", 69 | "vcr", 70 | "adventurer" 71 | ], 72 | "location": 2 73 | } 74 | ] 75 | } 76 | -------------------------------------------------------------------------------- /5 - AWS Fargate/code/characters/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "koa": "^1.2.5", 4 | "koa-router": "^5.4.0" 5 | }, 6 | "scripts": { 7 | "start": "node server.js" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /5 - AWS Fargate/code/characters/server.js: -------------------------------------------------------------------------------- 1 | const app = require('koa')(); 2 | const router = require('koa-router')(); 3 | const db = require('./db.json'); 4 | 5 | // Log requests 6 | app.use(function *(next) { 7 | const start = new Date; 8 | yield next; 9 | const ms = new Date - start; 10 | console.log('%s %s - %s', this.method, this.url, ms); 11 | }); 12 | 13 | router.get('/api/characters', function *() { 14 | this.body = db.characters; 15 | }); 16 | 17 | router.get('/api/characters/:id', function *() { 18 | const id = parseInt(this.params.id, 10); 19 | this.body = db.characters.find((character) => character.id === id); 20 | }); 21 | 22 | router.get('/api/characters/by-location/:locationId', function *() { 23 | const id = parseInt(this.params.locationId, 10); 24 | this.body = db.characters.filter((character) => character.location === id); 25 | }); 26 | 27 | router.get('/api/characters/by-gender/:gender', function *() { 28 | const gender = this.params.gender.toLowerCase(); 29 | this.body = db.characters.filter((character) => character.gender === gender); 30 | }); 31 | 32 | router.get('/api/characters/by-species/:species', function *() { 33 | const species = this.params.species.toLowerCase(); 34 | this.body = db.characters.filter((character) => character.species.includes(species)); 35 | }); 36 | 37 | router.get('/api/characters/by-occupation/:occupation', function *() { 38 | const occupation = this.params.occupation.toLowerCase(); 39 | this.body = db.characters.filter((character) => character.occupations.includes(occupation)); 40 | }); 41 | 42 | router.get('/', function *() { 43 | this.body = 'Ready to receive requests'; 44 | }); 45 | 46 | app.use(router.routes()); 47 | app.use(router.allowedMethods()); 48 | 49 | var server = app.listen(80); 50 | 51 | process.on('SIGTERM', function() { 52 | console.log('Shutting down...'); 53 | server.close(); 54 | }); 55 | 56 | -------------------------------------------------------------------------------- /5 - AWS Fargate/code/locations/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mhart/alpine-node:7.10.1 2 | 3 | WORKDIR /srv 4 | ADD . . 5 | RUN npm install 6 | 7 | EXPOSE 80 8 | CMD ["node", "server.js"] 9 | -------------------------------------------------------------------------------- /5 - AWS Fargate/code/locations/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "locations": [ 3 | { 4 | "id": 1, 5 | "name": "The Nightosphere", 6 | "description": "The demon world" 7 | }, 8 | { 9 | "id": 2, 10 | "name": "Tree Fort", 11 | "description": "Home of Finn, Jake, and BMO" 12 | }, 13 | { 14 | "id": 3, 15 | "name": "Candy Kingdom", 16 | "description": "Kingdom made up of and populated by candy people" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /5 - AWS Fargate/code/locations/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "koa": "^1.2.5", 4 | "koa-router": "^5.4.0" 5 | }, 6 | "scripts": { 7 | "start": "node server.js" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /5 - AWS Fargate/code/locations/server.js: -------------------------------------------------------------------------------- 1 | const app = require('koa')(); 2 | const router = require('koa-router')(); 3 | const db = require('./db.json'); 4 | 5 | // Log requests 6 | app.use(function *(next) { 7 | const start = new Date; 8 | yield next; 9 | const ms = new Date - start; 10 | console.log('%s %s - %s', this.method, this.url, ms); 11 | }); 12 | 13 | router.get('/api/locations', function *() { 14 | this.body = db.locations; 15 | }); 16 | 17 | router.get('/api/locations/:id', function *() { 18 | const id = parseInt(this.params.id, 10); 19 | this.body = db.locations.find((location) => location.id === id); 20 | }); 21 | 22 | router.get('/api/', function *() { 23 | this.body = 'API ready to receive requests'; 24 | }); 25 | 26 | router.get('/', function *() { 27 | this.body = 'Ready to receive requests'; 28 | }); 29 | 30 | app.use(router.routes()); 31 | app.use(router.allowedMethods()); 32 | 33 | var server = app.listen(80); 34 | 35 | process.on('SIGTERM', function() { 36 | console.log('Shutting down...'); 37 | server.close(); 38 | }); 39 | -------------------------------------------------------------------------------- /5 - AWS Fargate/images/browser-request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/5 - AWS Fargate/images/browser-request.png -------------------------------------------------------------------------------- /5 - AWS Fargate/images/create-load-balancer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/5 - AWS Fargate/images/create-load-balancer.png -------------------------------------------------------------------------------- /5 - AWS Fargate/images/create-service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/5 - AWS Fargate/images/create-service.png -------------------------------------------------------------------------------- /5 - AWS Fargate/images/delete-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/5 - AWS Fargate/images/delete-repository.png -------------------------------------------------------------------------------- /5 - AWS Fargate/images/ecs-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/5 - AWS Fargate/images/ecs-architecture.png -------------------------------------------------------------------------------- /5 - AWS Fargate/images/load-balancer-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/5 - AWS Fargate/images/load-balancer-info.png -------------------------------------------------------------------------------- /5 - AWS Fargate/images/service-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/5 - AWS Fargate/images/service-info.png -------------------------------------------------------------------------------- /5 - AWS Fargate/images/service-scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/5 - AWS Fargate/images/service-scale.png -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/code/recipes/characters.yml: -------------------------------------------------------------------------------- 1 | # Deploy the pods 2 | apiVersion: apps/v1beta2 3 | kind: Deployment 4 | metadata: 5 | name: characters-deployment 6 | spec: 7 | selector: 8 | matchLabels: 9 | app: characters 10 | replicas: 2 # tells deployment to run 2 pods matching the template 11 | template: # create pods using pod definition in this template 12 | metadata: 13 | labels: 14 | app: characters 15 | spec: 16 | containers: 17 | - name: characters 18 | image: 19 | ports: 20 | - containerPort: 8081 21 | --- 22 | # This service is used to expose the pods on a port 23 | apiVersion: v1 24 | kind: Service 25 | metadata: 26 | name: characters-service 27 | spec: 28 | selector: 29 | app: characters 30 | ports: 31 | - port: 8081 32 | protocol: TCP 33 | -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/code/recipes/locations.yml: -------------------------------------------------------------------------------- 1 | # Deploy the pods 2 | apiVersion: apps/v1beta2 3 | kind: Deployment 4 | metadata: 5 | name: locations-deployment 6 | spec: 7 | selector: 8 | matchLabels: 9 | app: locations 10 | replicas: 2 # tells deployment to run 2 pods matching the template 11 | template: # create pods using pod definition in this template 12 | metadata: 13 | labels: 14 | app: locations 15 | spec: 16 | containers: 17 | - name: locations 18 | image: 19 | ports: 20 | - containerPort: 8081 21 | --- 22 | # This service is used to expose the pods on a port 23 | apiVersion: v1 24 | kind: Service 25 | metadata: 26 | name: locations-service 27 | spec: 28 | selector: 29 | app: locations 30 | ports: 31 | - port: 8081 32 | protocol: TCP 33 | -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/code/recipes/nginx.yml: -------------------------------------------------------------------------------- 1 | # Deploy the pods 2 | apiVersion: apps/v1beta2 3 | kind: Deployment 4 | metadata: 5 | name: nginx-router 6 | spec: 7 | selector: 8 | matchLabels: 9 | app: nginx-router 10 | replicas: 2 # tells deployment to run 2 pods matching the template 11 | template: # create pods using pod definition in this template 12 | metadata: 13 | labels: 14 | app: nginx-router 15 | spec: 16 | containers: 17 | - name: nginx-router 18 | image: 19 | ports: 20 | - containerPort: 80 21 | --- 22 | # This service is used to expose the router using a load balancer 23 | apiVersion: v1 24 | kind: Service 25 | metadata: 26 | name: nginx-router 27 | spec: 28 | selector: 29 | app: nginx-router 30 | ports: 31 | - port: 80 32 | targetPort: 80 33 | type: LoadBalancer 34 | -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/code/services/characters/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mhart/alpine-node:7.10.1 2 | 3 | WORKDIR /srv 4 | ADD . . 5 | RUN npm install 6 | 7 | EXPOSE 8081 8 | CMD ["node", "server.js"] 9 | -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/code/services/characters/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "characters": [ 3 | { 4 | "id": 1, 5 | "name": "Marceline Abadeer", 6 | "gender": "female", 7 | "species": [ 8 | "human", 9 | "demon", 10 | "vampire" 11 | ], 12 | "occupations": [ 13 | "queen" 14 | ], 15 | "location": 1 16 | }, 17 | { 18 | "id": 2, 19 | "name": "Finn 'the Human' Mertens", 20 | "gender": "male", 21 | "species": [ 22 | "human" 23 | ], 24 | "occupations": [ 25 | "adventurer", 26 | "hero" 27 | ], 28 | "location": 2 29 | }, 30 | { 31 | "id": 3, 32 | "name": "Bonnibel Bubblegum", 33 | "gender": "female", 34 | "species": [ 35 | "candy elemental" 36 | ], 37 | "occupations": [ 38 | "princess", 39 | "scientist" 40 | ], 41 | "location": 3 42 | }, 43 | { 44 | "id": 4, 45 | "name": "Jake the Dog", 46 | "gender": "male", 47 | "species": [ 48 | "dog", 49 | "shape-shifter" 50 | ], 51 | "occupations": [ 52 | "criminal", 53 | "hero", 54 | "adventurer", 55 | "father" 56 | ], 57 | "location": 2 58 | }, 59 | { 60 | "id": 5, 61 | "name": "BMO", 62 | "gender": "genderless", 63 | "species": [ 64 | "mo" 65 | ], 66 | "occupations": [ 67 | "video game console", 68 | "computer", 69 | "vcr", 70 | "adventurer" 71 | ], 72 | "location": 2 73 | } 74 | ] 75 | } 76 | -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/code/services/characters/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "koa": "^1.2.5", 4 | "koa-router": "^5.4.0" 5 | }, 6 | "scripts": { 7 | "start": "node server.js" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/code/services/characters/server.js: -------------------------------------------------------------------------------- 1 | const app = require('koa')(); 2 | const router = require('koa-router')(); 3 | const db = require('./db.json'); 4 | 5 | // Log requests 6 | app.use(function *(next) { 7 | const start = new Date; 8 | yield next; 9 | const ms = new Date - start; 10 | console.log('%s %s - %s', this.method, this.url, ms); 11 | }); 12 | 13 | router.get('/api/characters', function *() { 14 | this.body = db.characters; 15 | }); 16 | 17 | router.get('/api/characters/:id', function *() { 18 | const id = parseInt(this.params.id, 10); 19 | this.body = db.characters.find((character) => character.id === id); 20 | }); 21 | 22 | router.get('/api/characters/by-location/:locationId', function *() { 23 | const id = parseInt(this.params.locationId, 10); 24 | this.body = db.characters.filter((character) => character.location === id); 25 | }); 26 | 27 | router.get('/api/characters/by-gender/:gender', function *() { 28 | const gender = this.params.gender.toLowerCase(); 29 | this.body = db.characters.filter((character) => character.gender === gender); 30 | }); 31 | 32 | router.get('/api/characters/by-species/:species', function *() { 33 | const species = this.params.species.toLowerCase(); 34 | this.body = db.characters.filter((character) => character.species.includes(species)); 35 | }); 36 | 37 | router.get('/api/characters/by-occupation/:occupation', function *() { 38 | const occupation = this.params.occupation.toLowerCase(); 39 | this.body = db.characters.filter((character) => character.occupations.includes(occupation)); 40 | }); 41 | 42 | router.get('/', function *() { 43 | this.body = 'Ready to receive requests'; 44 | }); 45 | 46 | app.use(router.routes()); 47 | app.use(router.allowedMethods()); 48 | 49 | var server = app.listen(8081); 50 | 51 | process.on('SIGTERM', function() { 52 | console.log('Shutting down...'); 53 | server.close(); 54 | }); 55 | 56 | -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/code/services/locations/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mhart/alpine-node:7.10.1 2 | 3 | WORKDIR /srv 4 | ADD . . 5 | RUN npm install 6 | 7 | EXPOSE 8081 8 | CMD ["node", "server.js"] 9 | -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/code/services/locations/db.json: -------------------------------------------------------------------------------- 1 | { 2 | "locations": [ 3 | { 4 | "id": 1, 5 | "name": "The Nightosphere", 6 | "description": "The demon world" 7 | }, 8 | { 9 | "id": 2, 10 | "name": "Tree Fort", 11 | "description": "Home of Finn, Jake, and BMO" 12 | }, 13 | { 14 | "id": 3, 15 | "name": "Candy Kingdom", 16 | "description": "Kingdom made up of and populated by candy people" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/code/services/locations/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "koa": "^1.2.5", 4 | "koa-router": "^5.4.0" 5 | }, 6 | "scripts": { 7 | "start": "node server.js" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/code/services/locations/server.js: -------------------------------------------------------------------------------- 1 | const app = require('koa')(); 2 | const router = require('koa-router')(); 3 | const db = require('./db.json'); 4 | 5 | // Log requests 6 | app.use(function *(next) { 7 | const start = new Date; 8 | yield next; 9 | const ms = new Date - start; 10 | console.log('%s %s - %s', this.method, this.url, ms); 11 | }); 12 | 13 | router.get('/api/locations', function *() { 14 | this.body = db.locations; 15 | }); 16 | 17 | router.get('/api/locations/:id', function *() { 18 | const id = parseInt(this.params.id, 10); 19 | this.body = db.locations.find((location) => location.id === id); 20 | }); 21 | 22 | router.get('/api/', function *() { 23 | this.body = 'API ready to receive requests'; 24 | }); 25 | 26 | router.get('/', function *() { 27 | this.body = 'Ready to receive requests'; 28 | }); 29 | 30 | app.use(router.routes()); 31 | app.use(router.allowedMethods()); 32 | 33 | var server = app.listen(8081); 34 | 35 | process.on('SIGTERM', function() { 36 | console.log('Shutting down...'); 37 | server.close(); 38 | }); 39 | -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/code/services/nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx 2 | COPY nginx.conf /etc/nginx/nginx.conf 3 | -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/code/services/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | events { 2 | worker_connections 768; 3 | } 4 | 5 | http { 6 | # Nginx will handle gzip compression of responses from the app server 7 | gzip on; 8 | gzip_proxied any; 9 | gzip_types text/plain application/json; 10 | gzip_min_length 1000; 11 | 12 | server { 13 | listen 80; 14 | 15 | # Nginx will reject anything not matching /api 16 | location /api/locations { 17 | # Only requests matching the whitelist expectations will 18 | # get sent to the application server 19 | proxy_pass http://locations-service:8081; 20 | } 21 | 22 | # Nginx will reject anything not matching /api 23 | location /api/characters { 24 | # Only requests matching the whitelist expectations will 25 | # get sent to the application server 26 | proxy_pass http://characters-service:8081; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/images/create-ssh-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/6 - Kubernetes (kops)/images/create-ssh-key.png -------------------------------------------------------------------------------- /6 - Kubernetes (kops)/images/kubernetes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nathanpeck/nodejs-aws-workshop/320eed8ff7f71d2c734e4e990266998baa343506/6 - Kubernetes (kops)/images/kubernetes.png --------------------------------------------------------------------------------