Conversation
The code can now be run using `make run` which would install the mermaid-cli using npm and create the in/out directories. It also passes the path for the provided puppeteer configuration file.
| Hey @diraneyya, Thanks for raising this PR! Very much appreciated. I'm fully onboard with updating mermaid cli to the latest version, however it looks like this PR contains some changes to run the API locally outside of the docker image. While that's fine in general it's not the aim:
If you have to install everything to run it locally, is there any benefit to using mermaid-server over mermaid cli? It also looks like I have to do some maintenance to get tests passing - I haven't touched this repo in a while. I won't block the PR on that. |
| Hello Tom. I identified your work as the best way currently to add Mermaid diagrams into Jupyter notebooks. Using this server locally (without Docker) was the most efficient and least disk space way for me to run a Mermaid server locally. The advantage that your work offers over mermaid.ink is that it is not a full-fledged web application and only uses the CLI to render the diagrams. The size of the Ideally, I would envision this project to use a globally installed CLI npm module to reduce it to a Golang binary, which surely can also be shipped via Docker. Having the CLI inside of the Docker image implies having the NodeJS runtime inside of Docker which is wasteful for folks like me with Node version managers who do not want to continue to pay a heavy disk space price for every new tool we use. Obviously there is a lot of different directions in which this project can go but for my use case I would like it to:
Basically it is just offering a REST API for rendering Mermaid diagrams, which is what we currently need for rendering Mermaid in Jupyter notebooks. I am well aware that this might not be the trajectory it is on or the direction you want for it. But I have done what worked for my use case and wanted to share it with you anyways. Thank you for your work. |
The code can now be run using
make runwhich would install the mermaid-cli using npm and create thein/out directories. It also passes the path for the provided puppeteer configuration file.