notelink
v1.0.2
Published
API documentation library for Bun using ElysiaJS
Downloads
66
Maintainers
Readme
NoteLink - API Documentation Library for Bun & ElysiaJS
A powerful and easy-to-use library for creating well-documented REST APIs with Bun and ElysiaJS. Automatically generate OpenAPI documentation for your endpoints with type safety and JWT authentication support.
Features
- 🚀 Built for Bun - Optimized for the fastest JavaScript runtime
- 📚 Auto-generated Documentation - Swagger UI out of the box
- 🔒 JWT Authentication - Built-in JWT support with @elysiajs/jwt
- 📝 TypeScript First - Full type safety and IntelliSense support
- 🎯 Simple API - Clean and intuitive interface
- ⚡ Fast & Lightweight - Minimal overhead, maximum performance
- 🔧 Flexible Configuration - Customize to your needs
- 🛠️ Custom Middleware - Easy integration of custom middleware functions
Installation
Quick Start - Create a New Project
The fastest way to get started is to create a new project using create-notelink:
# Using bunx (recommended)
bunx create-notelink my-app
# Or using bun create
bun create notelink my-app
cd my-app
bun install
bun devYour API will be running at http://localhost:8080 with documentation at http://localhost:8080/api-docs
Note: The
create-notelinkCLI tool is now in a separate repository: create-notelink
Add to Existing Project
bun add notelinkBuilt-in Examples
The library includes several ready-to-use middleware examples:
- Logging Middleware - Log all requests and responses
- Rate Limiting - Limit requests per IP address
- Request ID - Track requests with unique IDs
Examples
The examples/ directory contains sample applications demonstrating NoteLink usage:
Running Examples
# Install example dependencies
bun run example:install
# Run the basic example
bun run example:basicThe basic example demonstrates:
- Simple GET/POST endpoints
- Path and query parameters
- Request body validation
- OpenAPI documentation generation
Visit http://localhost:3000/swagger to see the auto-generated API documentation.
For more details, see the examples README.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE file for details
Credits
Inspired by the Go notelink library for Fiber framework.
Special thanks to:
Support
For issues and questions, please open an issue on GitHub.
Built with ❤️ using Bun ElysiaJS and Scalar
