update readme

This commit is contained in:
2017-10-29 13:31:09 +01:00
parent f2818ba15a
commit 64ccf8327a

View File

@@ -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
# build distribution source to data folder
npm run build
```