Skip to content

A simple Flasky app to save comments about topics deployed without cost using Serverless framework.

License

Notifications You must be signed in to change notification settings

bertini36/serverless-comments-engine

Repository files navigation

serverless Build Status Coverage Status Requirements Status License: MIT

bertini36/serverless-comments-engine 💬

Installation   •  Serverless config   •  Commands

A simple Flasky app to save comments about topics deployed without cost using Serverless framework and AWS

Powered by #serverless, #aws and #flask

⚙️ Environment Setup

🐳 Required tools

  1. Install Docker and Docker Compose
  2. Clone this project: git clone https://github.com/bertini36/serverless-comments-engine
  3. Move to the project folder: serverless-comments-engine

🔥 Application execution

  1. Install all the dependencies and bring up the project with Docker executing: make build
  2. Run the server: make up (by default Flask runs applications at 5000 port)

👩‍💻 API endpoints

  • Get comments
import requests

response = requests.get('http://127.0.0.1:5000/comments/topic')
  • Register comment
import json
import requests

response = requests.post(
    'http://127.0.0.1:5000/comments/topic',
    json.dumps({'name': 'John Doe', 'email': '[email protected]', 'text': 'Ouh mama'}),
    headers={'Content-Type': 'application/json'}
)

🚀 Deploy

First set your AWS credentials and optionally, you can add a Sentry DSN in .env file.

cp .env-sample .env

After this, to deploy your lambda functions

make deploy

When deploy is finished you will see the app endpoints for get and add comments.


— Built with ❤️ from Mallorca —

About

A simple Flasky app to save comments about topics deployed without cost using Serverless framework.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published