Git Product home page Git Product logo

serverless-functions's Introduction

Serverless Stack

This repository contains all my serverless functions currently hosted on AWS.

Configuration

Create AWS access as described here. Using the received credentials, add a profile to ~/.aws/credentials:

[profileName]
aws_access_key_id=***************
aws_secret_access_key=***************

Setup

Serverless is included as a dependency in the root of the repository to make sure the version is pinned cross functions. It's advised to use yarn over npm as we're 2018 (and it's faster too ๐Ÿ˜„).

$ yarn install

When you want to initialize a function, navigate to the folder and install it's dependencies.

$ cd github-webhooks
$ yarn install

Each function is configured to use serverless included in the root of the repository.

Debugging

I advice to use Visual Studio Code given that the debug task is included in the project, feel free to create a PR if you wan't to add other integrations. Pressing F5 will use serverless-offline to start a debug session and run the function.

Beware: setting breakpoints might tell you they can't be bound, this is not true.

Use any tool of choice to invoke http functions and have fun.

Secure Variables

The runtime variables are included in the project. The serverless-secrets-plugin is used to encrypt and decrypt them.

$ yarn sls encrypt --password correcthorsebatterystaple --stage production

Deployment

You can deploy individual functions using serverless. Navigate to the function you wish to deploy and use the deploy command.

$ yarn sls deploy --verbose --aws-profile profileName

serverless-functions's People

Contributors

jandedobbeleer avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

vikingco

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.