From 64ccf8327a9d94ce98368f812c5585dfa05de4cd Mon Sep 17 00:00:00 2001 From: Patrick Balsiger Date: Sun, 29 Oct 2017 13:31:09 +0100 Subject: [PATCH] update readme --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 98bceaa..438353d 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ HTTP endpoints: /files -> GET returns list of files # Install -- install arduino ide (1.8.5) +- install arduino ide (1.8.5) or PlatformIO (see Development section for further instructions) - follow this instruction https://github.com/esp8266/Arduino#installing-with-boards-manager @@ -43,12 +43,52 @@ You may also need to: https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers # Development +PlatformIO +---------- +The project is intended to run on PlatformIO and the build environment is configured for NodeMCU 0.9 (ESP-12 Module). +More informations: http://docs.platformio.org/en/latest/platforms/espressif8266.html + +Following libraries need to be installed via PIO Home / Libraries: +- SoftwareSerial +- ArduinoJson + +Use following commands to build and upload the firmware and filesystem: +``` +# clean the build directory +pio run -t clean + +# run default build job / build the formware +pio run + +# upload the firmware +pio run -e nodemcu -t upload + +# build the filesystem +pio run -t buildfs + +# upload the filesystem +pio run -t uploadfs + +``` + +PlatformIO tasks can also be triggered with following npm run commands (pio / platformio executable needs to be in $PATH): +``` +build:fs +upload:fs +build:firmware +upload:firmware +``` + Frontend -------- -Frontend development requires NodeJS / NPM. - -Run development server: +Frontend development requires NodeJS / npm. +The development server watches all files in the frontend directory and automatically builds and copies the frontend code to the data folder. + +``` +# run development server on port 8080 npm run dev -Build distribution source: -npm run build \ No newline at end of file +# build distribution source to data folder +npm run build +``` + \ No newline at end of file