Coder Social home page Coder Social logo

owezzy / tempmessenger Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 32 KB

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

Python 86.85% HTML 13.15%
nameko docker-compose redis-database postgresql-database rabbitmq-management flask-restful pytest

tempmessenger's Introduction

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

tempmessenger's People

Watchers

 avatar

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.