1.0.4 • Published 2 years ago

@kimkun07/mindmap_mind-api v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

About

mind-api is an API for MindElixir Project.\ It is used for an endpoint of server providing data for a mindmap.

Related Link

How to use

  • Install mind-api
  • Server
    • Provide MindResponse
  • Client
    • Fetch MindResponse

Install mind-api

npm i -D @kimkun07/mindmap_mind-api

Provide MindResponse

import { MindResponse } from "@kimkun07/mindmap_mind-api";

server.get("/", async function (req: Request, res: Response) {
  let result: MindResponse = {
    status: "Page Retrieve Success",
    rawNodeData: await get_node(process.env.NOTION_PAGE_ID_ROOT!), // NodeObj
  };
  res.json(result); // json of MindResponse
});

Fetch MindResponse

import { MindResponse } from "@kimkun07/mindmap_mind-api";

let httpResponse = await fetch(url);
let mindResponse: MindResponse = await httpResponse.json();

How to develop

  1. Publish to npm
    npm run build
    npm version patch
    npm publish --access public
  2. Update from usage
    npm outdated
    npm update @kimkun07/mindmap_mind-api
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago