The UI for WiFi Connect is built using React, bootstrapped by create-react-app. In order to develop for the UI you need to do the following:
- Run
npm install
in the UI folder. - Run
npm start
to start the development server. This will serve the UI onlocalhost:3000
by default. - Any changes to the code will automatically reflect in the UI without having to manually refresh.
The production bundle is generated by running npm build
, which will bundle and minify the react code. This will create a build
folder where all the static resources will be located. You can then serve the index.html
file and the contents of the build
folder however you wish.
All networking requests are done using the fetch
API. Polyfills are added for fetch
and Promise
which should improve the support for older browsers.