In Aglio is it possible to run server from Node.js library?

151 views Asked by At

When you are working with binary - you have such option:

aglio -i input.apib -s

But what if I need to do the same from js library? I checked the code and it looks for me that there is no such possibility, but maybe I'm wrong. I can invoke binary from the js code, but it looks like overkill for me. Aglio version is 2.3.0

2

There are 2 answers

0
graffzon On BEST ANSWER

In fact I didn't found any way to use functionality similar to aglio -s from js library. The approach I chosen is to use it in normal way as parsing and saving output data to html, but after that I'm opening this html and subscribing to any changes related to the docs, which I compiled.

In result it gives me pretty similar behaviour like aglio -s provides.

1
Vincenzo On

aglio has a javascript API you can use from your application. It's stated in the appropriate README section