Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manuelgeek/chat-app
A simple chat App with mix app
https://github.com/manuelgeek/chat-app
Last synced: about 5 hours ago
JSON representation
A simple chat App with mix app
- Host: GitHub
- URL: https://github.com/manuelgeek/chat-app
- Owner: manuelgeek
- Created: 2022-01-14T16:17:34.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-01T06:04:00.000Z (over 1 year ago)
- Last Synced: 2024-04-24T02:42:36.941Z (7 months ago)
- Language: Elixir
- Size: 64.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ChatApp
ChatApp is a Stream Based API service used to create Chat Applications
## Installation
Make sure you have [Erlang](https://www.erlang.org/), [Elixir](https://elixir-lang.org/) and [PostgreSQL](https://www.postgresql.org/). The current versions of Erlang and Elixir are defined in [.tool-versions](/.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
```shell
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`
```json
{ "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