From 58d518822f3a83160bb7c7e13eaa76cff4a6be9d Mon Sep 17 00:00:00 2001 From: Haris Razis Date: Thu, 12 Nov 2020 17:04:47 +0200 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=93=9C=20Update=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 57 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f0db25b..dfb9707 100644 --- a/README.md +++ b/README.md @@ -4,47 +4,74 @@ **Anchiale was the Titan goddess of the warming heat of fire.** -Anchiale is an internet of things solution for temperature sampling with raspberry pi. It is designed around a scalable architecture, so it is capable of handling a big sample rate. +Anchiale is an internet of things solution for temperature sampling with raspberry pi. It is designed around a scalable architecture, so it is capable of handling a big sample rate. -## Installation + +# Installation Clone the project: git clone git@github.com:xrazis/Anchiale-pi.git - ## Run Locally -NPM install +The server connects to an influx-db instance. Make sure you first start the database and correctly set the .env file on the server. + +**Start** +Install npm packages: - npm install --prefix ./client npm install --prefix ./server + npm install --prefix ./client + +**Running the server:** + + npm start --prefix ./server + + +> Set the server URL in the /client/.env to http://localhost:3000/ +**Running the client:** + + npm start --prefix ./client ## Development mode -Running the server +**Running the server:** npm run dev prefix ./server -Running the client +**Running the client:** npm run dev prefix ./client -You can span as many clients as you want! ## Run in Docker -Start the database +**Start the database:** bash ./database/database.sh -Configure the database on localhost:8086. Be sure to set and export the token, org and bucket on /server/config/creds.ts. -Start the server +> Configure the database on localhost:8086. Be sure to set and export the token, org and bucket in the .env file. + +**Start the server** + + cd server + bash server.sh + + +> Set the server URL in the .env file. + +**Start the client** + + cd client + bash client.sh + + +## Connecting to the anchiale server running on [swarmlab.io](http://swarmlab.io) - bash ./server/server.sh +A server with a database is running over at swarmlab. You can connect your local client running on your pi! -Start the client - bash ./client/client.sh +1. Set the URL in the client .env file to XXXXXXXXXX. +2. Start up the client with one of the ways described above. +3. Done 😄 ! -> Note: This guide assumes that you run all containers localy and use the tempTestMeasure() on client.