Code Monkey home page Code Monkey logo

mermaid-server's Introduction

Hi there, I'm Tom ๐Ÿ‘‹

Tom Wright's github stats

Top Langs

Tools and Technologies

mermaid-server's People

Contributors

dependabot[bot] avatar mmorel-35 avatar tdurieux avatar tomasliumparas avatar tomwright avatar umaaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mermaid-server's Issues

node: bad option: --allow-all-origins=true

When I try to start mermaid-server for the first time using docker command. The docker container returns instantly, I go to the output and see this:
node: bad option: --allow-all-origins=true
I run the command found on this repo's readme file:
docker run -d --name mermaid-server -p 80:80 tomwright/mermaid-server:latest --allow-all-origins=true

Publish docker image for Apple M1 CPU

By executing command on Mac M1 Max:

docker run -d --name mermaid-server -p 88:80 tomwright/mermaid-server:latest

This error will appear:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

Issue with special characters

Hi Tom,
This is a great project, wel done!
I managed to get it working.

Could you help to fix the issue with special characters?

graph LR

p1[" Implementation "]
p2[[" Office 365 โญ๏ธ "]]

p1 --- p2

After encoding (UTF-8) the special chars are changed. Attached is a picture of the input and output in Postman.

Postman

In the live editor it works fine.

Cors?

Cors not enabled?

No clean-up of old diagrams

There is currently no clean-up of old diagrams.

Ideally a we should have a go-routine running to clean-up any diagrams that haven't been accessed without a given amount of time.

Output doesn't write to --out path in Docker

Tracking this here in case it's relevant / actionable...

Description

When running the docker container (make docker-run), and making a request, it looks like the "in" file (.mmd) gets written, but the "out" file (.svg) doesn't get written, and the container returns a 500.

Notes

I made a slight modification to the Makefile in order to build the docker image on my M1 Mac.

docker-image:
	docker buildx build --platform linux/amd64 -t ${DOCKER_IMAGE} .

Docker logs

2022/08/04 14:01:53 [500] could not generate diagram: cachingGenerater.generate failed: failed when executing mermaid: exit status 1: Generating single mermaid chart
: 
ProtocolError: Protocol error (Target.createTarget): Target closed.
    at /usr/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:103:24
    at new Promise (<anonymous>)
    at Connection.send (/usr/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:99:16)
    at Browser._createPageInContext (/usr/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Browser.js:258:91)
    at BrowserContext.newPage (/usr/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Browser.js:622:75)
    at Browser.newPage (/usr/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Browser.js:252:75)
    at /usr/app/node_modules/@mermaid-js/mermaid-cli/index.bundle.js:174:32
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/usr/app/node_modules/@mermaid-js/mermaid-cli/index.bundle.js:18:103)
    at _next (/usr/app/node_modules/@mermaid-js/mermaid-cli/index.bundle.js:20:194)

This puppeteer/puppeteer#1947 issue seems to be related

truncated results

Sometimes, rendering results are truncated and displayed incompletely. Here are the cases I have tested:

curl --location 'http://182.195.92.127:8082/generate' \
--header 'Content-Type: text/plain' \
--data 'graph
    a --> b1
    d --> b3
    a --> b2
    a --> b3
    b1 --> c
    b2 --> c
    b3 --> c
    c --> d
    e --> f
    f --> d
'

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.