jihchi / mermaid.ink

An open-source service that generates image URLs for diagrams based on the provided Mermaid code.

Home Page:https://mermaid.ink

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub CI

Getting Started

git clone https://github.com/jihchi/mermaid.ink.git
cd mermaid.ink
pnpm install
DEBUG=app:* pnpm start

Go to http://localhost:3000

Troubleshooting

I'm getting back HTTP 431 Request Header Fields Too Large error

Note that you may encounter DoS if you increase --max-http-header-size!

Thanks @ryepup for the analysis and work-arounds (#12)

  • If running locally, add --max-http-header-size to the start script in package.json

    • e.g. "start": "node --max-http-header-size=102400000 src/index.js"
  • If running via docker, use NODE_OPTIONS to increase --max-http-header-size

    • e.g. docker run --rm -it -e 'NODE_OPTIONS="--max-http-header-size=102400000"' -p 3000:3000 jihchi/mermaid.ink

Or, If running locally, run NODE_OPTIONS="--max-http-header-size=102400000" npm start to increase --max-http-header-size

Contributors

Many thanks for your help!

The image of contributors is made with contrib.rocks.

About

An open-source service that generates image URLs for diagrams based on the provided Mermaid code.

https://mermaid.ink

License:MIT License


Languages

Language:JavaScript 71.8%Language:HTML 25.0%Language:Dockerfile 3.3%