Best practices when working with the serverless framework

ape.gs/SLS-DiT

Why this talk?

Because we have all met this guy

Because we have all been burned by a framework

Because nobody knows what the future will hold

Best practices when adopting frameworks (and this time, the serverless framework)

ape.gs/SLS-DiT

What are we building?

Memebot

  • list all available meme templates
  • search through existing meme templates
  • create a meme using an existing template
  • create a meme from a custom image url

Functionality

Memebot

  • slack!
  • issue commands using a /memebot slash command

Interface

Goal: Decouple our business logic from the serverless framework as much as possible

Demo

Code Walkthrough

Layout our project

- bot/
   |--- src/
         |--- container.js <===== our dependency injection container
         |--- functions/
                  |------- memebot_slack_command.js
         |--- lib/
                  |------- config/...
                  |------- exceptions/...
                  |------- logger.js
                  |------- meme_api_manager.js
                  |------- memebot_api.js
                  |------- slack_api_manager.js
- spec/
  ...

Thank you!

ape.gs/SLS-DiT

Made with Slides.com