Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.06 KB

README.md

File metadata and controls

34 lines (26 loc) · 1.06 KB

Little Talks - Server

Simple server for Little Talks using Flask Framework and SQLite3 or Postgres. It´s an experimental chat server based on a latitude/longitude location.

Endpoints

We just receive a POST request on root and response the last 25 msgs in that location.

Request Params:

  • msg: message you want to send. (blank to send nothing)
  • nickname: a nickname of your user
  • lat: latitude you want to talk
  • lng: longitude you want to talk

Request Response:

  • Shell formatted text with 25 last message;

Environment Vars

  • MSG_TABLE: Table name for the messages;
  • DB: psql for Postgres and sqlite for Sqlite;

If you are using Postgres:

  • PS_DATABASE = Database name;
  • PS_USER = Database user;
  • PS_PASSWORD = Database password;
  • PS_HOST = Database host;
  • PS_PORT = Database Port. In general 5432;

Execution

pip install -r requirements-dev.txt
pip install -r requirements.txt
flask run