This project contains examples using the HOKA HTTP Server :
- example-simple : a minimal example of the HOKA webserver.
- example-https : similar to example-simple but using HTTPS.
- example-http-https-redirect : an example showing how to setup an automated redirection from HTTP to HTTPS.
- example-rest-api : an example of a REST API.
- example-error-handling : an example showing common errors handling.
- example-cors-filter : an example to setup CORS support in the server using filters.
- example-authentication : an example of a cookie session authentication and authorizations.
- example-slow-network : an example for slow networks using compression and caching techniques.
- template-wifi-example : a template to insert a HOKA example to enable Wi-Fi connectivity.
The examples can be run either on the simulator or on the device using following procedures.
- Right Click on the project to run
- Select Run as -> MicroEJ Application
- Select your platform
- Press Ok
- The application logging will be printed to the IDE console. The log will print the URL where you can access the HOKA server.
- Right Click on the example to build
- Select Run as -> Run Configuration
- Select MicroEJ Application configuration kind
- Click on New launch configuration icon
- In Execution tab
- In Target frame, in Platform field, select a relevant platform (but not a virtual device)
- In Execution frame
- Select Execute on Device
- In Settings field, select Build & Deploy
- In Configuration tab
- In Device frame
- Select Deploy
- In Configuration field, check the three first boxes. They all start with "Deploy.."
- Press Apply
- Press Run
- The MicroEj files will have been generated and deployed to your platform of choice, for example: A:/git/Platform-STMicroelectronics-STM32F7508-DK/stm32f7508_freertos-bsp/projects/microej/SW4STM32
- Use the appropriate flashing tool. For example: The platform Platform-STMicroelectronics-STM32F7508-DK has two scripts lying under A:/git/Platform-STMicroelectronics-STM32F7508-DK/stm32f7508_freertos-bsp/projects/microej/SW4STM32: build.bat, run.bat. Execute first build.bat and finally run.bat to flash the contents to the board.
The examples will log to the board. The log will print the URL where you can access the HOKA server.
To see the logging, use a connection tool like putty to establish a serial connection to the board.
After connecting your board to your computer, inspect your device settings and see which COM port is being used by the board. In putty then choose a serial connection and the serial line to connect to, for example: COM3.
This library requires the following Foundation Libraries:
@FOUNDATION_LIBRARIES_LIST@
All dependencies are retrieved transitively by Ivy resolver.
N.A.
None.