From 09b7aaa7e5da5be28101c392425d6c0d488bc8939c8dd71f7e8b2eae120e4252 Mon Sep 17 00:00:00 2001 From: localhorst Date: Mon, 30 Dec 2024 19:43:02 +0100 Subject: [PATCH] move and extend README --- LICENSE | 9 +++++++++ README.md | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f5ca99a --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2024 localhorst + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..9727bc4 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# LocationHub + +TODO + +## Setup +### Prerequisites +- Node.js >= 22.11.0 +- Maria DB >= 11.6.2 + +### Database +**Change name of database and credentials as you like!** + +- Create new database: `CREATE DATABASE locationhub;` +- Create new user for database: `GRANT ALL PRIVILEGES ON dev_locationhub.* TO 'dbuser'@'localhost' IDENTIFIED BY '1234';` +- Import tables: `/usr/bin/mariadb -u dbuser -p1234 dev_locationhub < server/sql/tables.sql` + +### Testing Webhook +- To test the webhook use the python script `ttn-webhook-dummy.py` to send prerecorded TTN Uplinks. +- To test the script you can use `while true; do echo -e "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\n\r\nSuccess"; nc -l -p 8080 -q 1; done` \ No newline at end of file