Coder Social home page Coder Social logo

lambda-sns-to-chatwork-function's Introduction

lambda-sns-to-chatwork-function

Build Status Dependency Status devDependency Status

Notify the SNS to chatwork.

image

Get started

git clone https://github.com/chatwork/lambda-sns-to-chatwork-function
cd lambda-sns-to-chatwork-function
echo '{
  "token": "[ChatWork API Token]",
  "roomId": [ChatWork Room ID],
  "template": "[Notify Message]"
}' > config/local.json
npm install
npm start # Notify the example events

Configuration

You will generate config/local.json.

name type value
CHATWORK_API_TOKEN string ChatWork API Token
CHATWORK_SEND_ROOM_ID int ID of the room to be sent to the ChatWork
CHATWORK_MESSAGE_TEMPLATE string The format of the message to be sent to the ChatWork (e.g. <%- Message %>)

Or please create a config/local.json

{
  "token": "[ChatWork API Token]",
  "roomId": [Send Room ID],
  "template": "[Message format]"
}

Deployment

Manual deploy

  1. git clone https://github.com/chatwork/lambda-sns-to-chatwork-function.git
  2. Generate config/local.json
  3. Run the npm run archive tasks
  4. It will upload the archive.zip as Lambda Function
  5. Add the SNS to the event source

Jenkins

  1. wget https://github.com/chatwork/lambda-sns-to-chatwork-function/archive/0.0.0.zip
  2. Generate config/local.json
  3. zip 0.0.0.zip config/local.json
  4. It will upload the 0.0.0.zip to S3
  5. To deploy the Lambda Function using the AWS Lambda Plugin

TravisCI

  1. To fork
  2. Add configuration value to .travis.yml of env
  3. Add npm run template to .travis.yml of after_success
  4. Add deployment configuration to .travis.yml (e.g. https://github.com/travis-ci/dpl#lambda)

License

MIT

Copyright

Copyright (c) 2015 ChatWork.inc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.