Read data from postgresql (radius) db

Hi!

Sorry if maybe such thread was open, but I couldn’t find what I need.

We have an OLT environment in which the ONT’s appropriate WAN VLAN ID is associated with the ONT profile name (Different ONT profiles are assigned to the ONTs located in separate areas that means each profile has a unique VLAN ID)
For this, it is necessary for us to read the profile name from a database. Based on this retrieved data we would know which profile is given to the ONT and then, we could write the appropriate provisioning script with the needed VLAN.

The database is in PostgreSQL. Could you help me with writing the appropriate ext script to connect and retrieve the data? Unfortunately, I am not familiar with Node.js.

Thank you in advance!