Hi,
> On May 14, 2018, at 01:30, Nabil Servais <nabil....@gmail.com> wrote:
>
> Hello,
>
> I would like to make a client for NATS (nats.io). So I found there is a library for nginx : https://github.com/nats-io/nginx-nats but the API is not available for openresty.
>
> If is possible, how I can expose the API from this module ?
>
> Thanks in advance.
If there's no existing resty library for it, you can write your own to interact with the NATS wire protocol via the ngx.socket API. Have a look a libraries like lua-resty-memcached, lua-resty-redis, or lua-resty-cassandra for examples of high-quality libraries that implement various wire protocol parsers and client implementations.
Good luck with it!