Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alwatr/nanotron
Nanotron: Your Lightweight, High-Performance Micro/Nano Service Framework
https://github.com/alwatr/nanotron
Last synced: about 1 month ago
JSON representation
Nanotron: Your Lightweight, High-Performance Micro/Nano Service Framework
- Host: GitHub
- URL: https://github.com/alwatr/nanotron
- Owner: Alwatr
- License: mit
- Created: 2024-09-03T15:23:10.000Z (4 months ago)
- Default Branch: next
- Last Pushed: 2024-09-14T13:22:12.000Z (3 months ago)
- Last Synced: 2024-09-15T12:23:26.750Z (3 months ago)
- Language: TypeScript
- Size: 3.34 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
## Nanotron
**Your Lightweight, High-Performance Micro/Nano Service Framework**
Nanotron is designed for building blazingly fast and efficient microservices and APIs. Its minimalist approach and focus on performance make it ideal for resource-constrained environments and scenarios where every millisecond counts.
## Key Features
- **Lightweight:** Minimal dependencies and a small footprint ensure optimal performance.
- **High-Performance:** Optimized for speed and efficiency in handling requests.
- **Microservice-Friendly:** Perfect for building and managing microservices architectures.
- **Intuitive API:** Simple and easy-to-use API for defining routes and handling requests.
- **TypeScript Support:** Built with TypeScript for enhanced type safety and developer experience.## Installation
```bash
npm install @alwatr/nanotron
```## Getting Started
```js
import { NanotronApiServer } from '@alwatr/nanotron';const apiServer = new NanotronApiServer({
host: '0.0.0.0',
port: 80,
prefix: '/api/',
});apiServer.defineRoute({
method: 'GET',
url: '/hello',
handler() {
this.serverResponse.replyJson({
ok: true,
message: 'Hello :)',
});
}
});apiServer.defineRoute({
method: 'POST',
url: '/echo-body',
async handler() {
const body = await this.getBodyRaw();
this.serverResponse.replyJson({
ok: true,
data: body.toString(),
});
}
});
```## Sponsors
The following companies, organizations, and individuals support Nanotron ongoing maintenance and development. Become a Sponsor to get your logo on our README and website.
[![Exir Studio](https://avatars.githubusercontent.com/u/181194967?s=200&v=4)](https://exirstudio.com)
### Contributing
Contributions are welcome! Please read our [contribution guidelines](https://github.com/Alwatr/.github/blob/next/CONTRIBUTING.md) before submitting a pull request.
### License
This project is licensed under the [AGPL-3.0 License](LICENSE).