chialab / math-api

âž— Serverless API to render maths using MathJax for Node.
MIT License
43 stars 8 forks source link

Fix "Getting started" #1

Closed crossi36 closed 5 years ago

crossi36 commented 5 years ago

It seems like the repository name changed at some point, but the "Getting started" section wasn't updated. Running the command results in:

$ docker run --name mathjax-node -d -p 8080:80 chialab/mathjax-node
Unable to find image 'chialab/mathjax-node:latest' locally
docker: Error response from daemon: pull access denied for chialab/mathjax-node, repository does not exist or may require 'docker login'.

The proposed change fixes that.

fquffio commented 5 years ago

Hi @crossi36 , thanks for your interest in this project and for your contribution!

Except for this mistake, were you able to set it all up and get things to work? 🙂

crossi36 commented 5 years ago

Hey @fquffio, thank you for merging my first pull request 😄

I had one minor problem setting this up.

JSON payload with at least format (either latex or mathml) and source keys

I thought this meant I had to provide a payload that looks like this

{
    "format": "latex",
    "source": "\\sin^2{\\theta} + \\cos^2{\\theta} = 1"
}

It actually needs to look like this

{
    "type": "latex",
    "source": "\\sin^2{\\theta} + \\cos^2{\\theta} = 1"
}

If I had looked at the given example I wouldn't have had that problem, so I guess it was my fault.

fquffio commented 5 years ago

Yeah that was definitely your fault… 😡 but it totally makes sense to replace format with type also in the discursive introduction to the example, I guess. 😂 Fixed this in 050fe0a, thanks! 😉