This project takes on a Hybrid approach where the Front End control of things will be a SPA (Single Page Application) written in Java-Script so on the Server IoT side of things there will obly be a need to create a API endpoint.
It is created using Preact & Microbundle.
A Mockup API to run and test this code against is at: IoT_Base_MockAPI
These instructions will get you a copy of the project up and running on your local machine for development and deployment purposes.
This project was built using VS-Code.
The project is written in Java-Script and require Node.JS & NPM to be installed.
Working on windows I also use Git-SCM
Given the nature of the project, I'm not going to go over how to setup your local machine.
In order to get the project, just do a Git: checkout to this repository.
Then run npm install to automaticaly install all project dependencies such as Preact and Microbundle from github.com and you are good to go.
It is recomended also to Install the Mockup API for this project. It can be found at: IoT_Base_MockAPI
Open two terminal windows.
In the first give the command npm run build_dev
In the second give the command npm run serve
The code in this repository is Split into three main directories.
The src directory contain all the Java-Script code.
The build_dev directory contain html and CSS files. After a seccessfull build*dev it will also contain .js and .map files. This is the derectory from the live server will serve the content for development perposes.
The build directory is very much the same as the build_dev. only building the project files there will generate a smaller more compact version of the built files in order to save memory space on the IoT device.
In the readme file - Write the deployment section
Fix the "npm run dev" script.