Web application for the water sensor API, written in Elm.
You need NodeJS 16. Elm will be installed through npm.
If you aren't familiar with Elm yet, you should probably read the tutorial. When you're done with that, here's another tutorial.
If you use nvm
, add an override for the required NodeJS version:
nvm install
nvm use
To install all dependencies:
make setup
Next, set up the required env vars:
echo "API_TOKEN='...'" >> .env
To build the application, just type
make dist
The output will be written to the dist/
directory.
To start the dev server:
make run
Now visit localhost:8000 in your browser to see the application.
To run the tests:
make test
The entry point of the application is in src/elm/Main.elm
. The application is
injected into a HTML page in src/static/index.html.hbs
. The non-Elm scripting
is done in src/static/index.js
, and bridged to Elm using the port
system.
Contributions are welcome. If you need any guidance, feel free to create an issue on Github or join our Mattermost channel ~gfrorli on chat.coredump.ch!
Before committing, make sure to reformat your code with elm-format. You can do
so using your IDE, or with make format
.
Copyright © 2017–2024 Coredump Hackerspace.
Licensed under the AGPLv3 or later, see LICENSE.md
.