Skip to content

A simple application that sends messages that have an expiry time, persistent with User Authentication and Authorization web session.

Notifications You must be signed in to change notification settings

owezzy/TempMessenger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TempMessenger

CircleCI

Goals

  • A user can go to a website and messages.
  • A user can see messages that others have sent.
  • Messages automatically expire after a configurable amount of time.

Requirements

  • Nameko microservices framework for Python
  • Docker
Starting a RabbitMQ container
  • It is good practice when running services in containers, Use an isolated docker network in order to be able to reference it using DNS.

    docker network create nameko_net

In the terminal execute:

$ docker run -d --network nameko_net --hostname rabbitmqhost --name rabbitmq -p 15672:15672 -p 5672:5672 rabbitmq:3-management

Starting a Redis Container
  • Redis is an in-memory data store

  • Execute this in terminal:

    $ docker run -d --network nameko_net --hostname redishost -p 6379:6379 --name redis redis

  • Port 6379 is exposed on the container to facilitate communicate between Nameko and Redis container

Installing Python Redis Client
  • This allows interaction with Python
  • Add redis in the base.in file, and recomplie using pip-compile requirements/base.in to generate it to new base.txt.
Initial Setup

While from the root directory. To generate nameko dependencies file:

$ pip-compile requirements/base.in

  • To generate teststing dependencies file:

$ pip-compile requirements/test.in

  • To install the required packages for our development environment:

$ pip install -r requirements/base.txt -r requirements/test.txt

  • To run the application: $ nameko run temp_messenger.service --config config.yaml

Tests

Tests are written using pytest

  • Run pytest to run the tests from the terminal.

  • To generate a report: $ pytest --cov=temp_messenger

workflow

About

A simple application that sends messages that have an expiry time, persistent with User Authentication and Authorization web session.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published