Skip to content

manuelgeek/chat-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatApp

ChatApp is a Stream Based API service used to create Chat Applications

Installation

Make sure you have Erlang, Elixir and PostgreSQL. The current versions of Erlang and Elixir are defined in .tool-versions.

Change into the chat_app/ directory and run the following commands:

Setup

cp config/dev.smple.exs config/dev.exs

Install Dependencies and run

mix deps.get
# sets up db and seeds sample data
mix ecto.reset
mix run --no-halt

Access on

http://localhost:4000

API doc

https://documenter.getpostman.com/view/3385291/UVXjJvdH

Usage

Login on /login or register with /register then use the auth_token value as a authorization header with subsequent API calls.

Web socket subscribes to POST: http://localhost:4000/ws/chat

{ "message" : "your message here" }

Tests

Check config/test.exs for Test ENV config. To run test, run;

mix test

What I could have done better

Given more time, I would have;

  • Added more test coverage
  • Added CI deployment script
  • Figure out adding route scope macro for plug routes
  • Check deeply into cowboy web sockets

About

A simple chat App with mix app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages