alexharv074 / serverless-chat-app

Proof of concept serverless chat app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SAM PoC

Overview

Proof of concept using Serverless Application Model (SAM).

Usage

Install dependencies:

▶ brew install python@2
▶ pip install virtualenv

Install Docker CE (ref).

Ensure you have an AWS account and access keys configured.

Set up a Virtualenv:

▶ virtualenv ./virtualenv
▶ . virtualenv/bin/activate
▶ pip install -r requirements.txt

Test it's working:

▶ sam --version
SAM CLI, version 0.10.0

Cleanup:

▶ deactivate

Return to the Virtualenv later without reinstalling:

▶ . virtualenv/bin/activate
▶ sam --version
SAM CLI, version 0.10.0

Useful docs:

Hello world app

Overview

This section is based on the SAM Quick Start section.

sam init

The sam init command initialises a serverless application with a SAM template, a folder structure inside the directory sam-app, unit tests and so on. For more information, try sam init --help. Note the options that can be passed to --runtime:

▶ sam init --help
...
    -r, --runtime [dotnetcore1.0|go1.x|nodejs|python|python2.7|python3.6|python3.7|ruby2.5|dotnetcore2.0|dotnetcore2.1|go|dotnet|java|nodejs4.3|nodejs6.10|java8|nodejs8.10|dotnetcore]
                                  Lambda Runtime of your app

I ran:

▶ sam init --runtime python2.7
[+] Initializing project structure...
[SUCCESS] - Read sam-app/README.md for further instructions on how to proceed
[*] Project initialization is now complete

This creates four things:

  1. A "hello world" app in Python 2.7 inside sam-app/hello_world.
  2. Unit tests in Pytest for it inside sam-app/tests.
  3. A SAM template in sam-app/template.yml.
  4. a README.md in sam-app/README.md with further instructions.

About

Proof of concept serverless chat app


Languages

Language:JavaScript 38.5%Language:HTML 37.2%Language:Shell 23.8%Language:CSS 0.5%