Skip to content

Commit 7afaa6b

Browse files
committed
docs: add usage examples for Node.js in README to facilitate quick start with HackMD API
1 parent 8177053 commit 7afaa6b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,30 @@ This repository contains a set of packages for interacting with the [HackMD API]
66

77
See [README](./nodejs)
88

9+
## Examples
10+
11+
To help you get started quickly, we provide comprehensive usage examples in the `examples/` directory:
12+
13+
### Node.js Example
14+
15+
The `examples/nodejs/` directory contains a complete example project demonstrating:
16+
17+
- User information retrieval
18+
- Note creation and management
19+
- ETag support for caching
20+
- Content updates
21+
- Error handling with retry logic
22+
- Environment variable configuration
23+
24+
To run the Node.js example:
25+
26+
1. Navigate to the example directory: `cd examples/nodejs`
27+
2. Follow the setup instructions in [examples/nodejs/README.md](./examples/nodejs/README.md)
28+
3. Set your HackMD access token
29+
4. Run `npm start`
30+
31+
The example includes detailed comments and demonstrates best practices for using the HackMD API client.
32+
933
## LICENSE
1034

1135
MIT

0 commit comments

Comments
 (0)