Azure IoT Central connectivity

Hi,

I am trying to connect an esp32 to Azure IoT Central instead of IoT Hub and relay information received by UART.

I can successfully connect to IoTHub, but I am unsure about how to structure the init.js file to achieve this.

Has anyone successfully connected an esp32 to IoT Central?

Thanks