https://github.com/williamthome/ephone-book
A simple phone-book web app using just erlang as a server for the front and the backend. The app uses cowboy for requests and rebar3 to compile. At the moment the data is stored in an ETS table, then, if the server goes down or restarted, the data will be lost. Future implementations will use PostgreSQL, WebSockets and improve the UI.
https://github.com/williamthome/ephone-book
cowboy css docker erlang ets flyio html otp phonebook rebar3
Last synced: about 1 month ago
JSON representation
A simple phone-book web app using just erlang as a server for the front and the backend. The app uses cowboy for requests and rebar3 to compile. At the moment the data is stored in an ETS table, then, if the server goes down or restarted, the data will be lost. Future implementations will use PostgreSQL, WebSockets and improve the UI.
- Host: GitHub
- URL: https://github.com/williamthome/ephone-book
- Owner: williamthome
- License: apache-2.0
- Created: 2021-10-25T18:31:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-03T01:52:27.000Z (over 3 years ago)
- Last Synced: 2025-01-30T08:43:21.680Z (3 months ago)
- Topics: cowboy, css, docker, erlang, ets, flyio, html, otp, phonebook, rebar3
- Language: Erlang
- Homepage: https://ephone-book.fly.dev/
- Size: 92.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ephone_book
An OTP application
## Dev
> Make sure to open your browser and the url from the current page
be the app page.Live reload to watch changes in erlang modules and assets files
$ ./ephone_book.sh dev-watch
Live reload for erlang modules
$ ./ephone_book.sh run dev
Live reload for assets files
$ ./ephone_book.sh watch
## Rebar3
### Compile
$ rebar3 compile
### Run in shell
$ rebar3 shell
### Build a release
$ rebar3 as prod release
### Run the release in shell
$ rebar3 as prod shell
## Docker
### Build
$ ./docker.sh build
### Run
Attached to the console (interactive)
$ ./docker.sh run it
or detached
$ ./docker.sh run d
> navigate to http://0.0.0.0:2938
## Deploying to fly.io
Command used to create the app:\
$ flyctl launch --image williamthome/ephone_book --name ephone-book$ ./ephone_book.sh deploy