Skip to content

w3hc/myst-api

Repository files navigation

Myst API

Install

pnpm i

Run

pnpm start

Test

pnpm test

End-to-end tests:

test:e2e

With coverage:

pnpm test:cov

Examples

Upload

Curl

curl -X 'POST' \
  'http://localhost:3000/file/upload' \
  -H 'accept: */*' \
  -H 'api-key: 1234' \
  -H 'Content-Type: multipart/form-data' \
  -F '[email protected];type=image/jpeg'

Response body:

{
  "message": "File uploaded successfully",
  "metadata": {
    "filename": "file-1721071831605-103105625.jpeg",
    "originalname": "brassens-rue -florimont (1).jpeg",
    "mimetype": "image/jpeg",
    "size": 134902,
    "uploadDate": "2024-07-15T19:30:31.611Z"
  }
}

Download

curl -X 'GET' \
  'http://localhost:3000/file/download/file-1721071831605-103105625.jpeg' \
  -H 'accept: */*' \
  -H 'api-key: 1234'

Prod

https://myst-api.jcloud-ver-jpe.ik-server.com/api

Versions

  • pnpm v8.7.5
  • node v20.9.0

Support

You can contact me via Element, Farcaster, Telegram, Twitter, Discord, or LinkedIn.