This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM mhart/alpine-node:8 | |
| ENV APPDIR=/app | |
| RUN mkdir $APPDIR | |
| RUN npm install --global tsc typescript | |
| ENV HOME=$APPDIR | |
| COPY package.json $APPDIR | |
| COPY jest.config.js $APPDIR | |
| COPY license.txt $APPDIR | |
| COPY .gitignore $APPDIR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // from https://stackoverflow.com/questions/51393952/mock-inner-axios-create/51414152#51414152 | |
| const mockAxios: any = jest.genMockFromModule('axios'); | |
| mockAxios.get = jest.fn(() => mockAxios); | |
| mockAxios.post = jest.fn(() => mockAxios); | |
| export default mockAxios; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| parser: `@typescript-eslint/parser`, | |
| extends: [ | |
| // "plugin:@typescript-eslint/recommended", | |
| `prettier/@typescript-eslint`, | |
| `plugin:prettier/recommended`, | |
| ], | |
| parserOptions: { | |
| ecmaVersion: 2018, | |
| sourceType: `module`, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ARG FUNCTION_RUNTIME | |
| FROM mikesir87/aws-cli as code | |
| ARG FUNCTION_NAME | |
| ARG AWS_DEFAULT_REGION | |
| ARG AWS_ACCESS_KEY_ID | |
| ARG AWS_SECRET_ACCESS_KEY | |
| RUN wget -O function.zip `aws lambda get-function --function-name $FUNCTION_NAME --query 'Code.Location' --output text` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| presets: [`@babel/env`, `@babel/preset-typescript`], | |
| plugins: [ | |
| `@babel/proposal-class-properties`, | |
| `@babel/proposal-object-rest-spread`, | |
| `transform-es2015-modules-commonjs`, | |
| `@babel/plugin-proposal-optional-chaining`, | |
| `@babel/plugin-proposal-nullish-coalescing-operator`, | |
| [ | |
| `@babel/plugin-transform-runtime`, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| //nothing here anymore. stuff into prettier top-level property of package.json | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| service: | |
| name: __FUNCTION_NAME__ | |
| plugins: | |
| - serverless-plugin-typescript | |
| - serverless-plugin-offline | |
| provider: | |
| name: aws | |
| stage: ${opt:stage, 'dev'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| CONTAINER_NAME=`pwd | xargs basename` | |
| DATA_FOLDER='data' | |
| CONTAINER_DATA_PATH=$CONTAINER_HOME/$CONTAINER_NAME/$DATA_FOLDER | |
| #HostIp=10.0.10.118 | |
| docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs \ | |
| -p 4001:4001 \ | |
| -p 2380:2380 \ | |
| -p 2379:2379 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ~/.bashrc: executed by bash(1) for non-login shells. | |
| # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
| # for examples | |
| # If not running interactively, don't do anything | |
| case $- in | |
| *i*) ;; | |
| *) return;; | |
| esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ~/.bashrc: executed by bash(1) for non-login shells. | |
| # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
| # for examples | |
| # If not running interactively, don't do anything | |
| case $- in | |
| *i*) ;; | |
| *) return;; | |
| esac |