🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

route-nest

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

route-nest

Route Nest offers a unique, directory-based routing solution for structuring and managing API routes. Designed for seamless integration with popular frameworks like [Express](https://expressjs.com/) and [Hono](https://honojs.dev/), it enables developers t

latest
npmnpm
Version
0.0.2
Version published
Maintainers
0
Created
Source

Route Nest 🐉

Route Nest offers a unique, directory-based routing solution for structuring and managing API routes. Designed for seamless integration with popular frameworks like Express and Hono, it enables developers to organize routes in a library-like folder structure. This approach simplifies the development process and enhances maintainability.

🌟 Features

  • 📁 Directory-Based Routing: Organize your API endpoints using a straightforward folder structure.
  • 📦 Full TypeScript Support: Take advantage of strong typing for better code quality and maintainability.
  • 🧰 Zero Dependencies: Lightweight with no external dependencies, ensuring fast and efficient operation.
  • 🪛 Highly Extensible: Easily extend functionality with Adapters to support additional frameworks.

📖 Usage

To start using Route Nest, you need to import and initialize it within your project. Here’s a quick guide on how to set it up with Express:

Installation

First, install the package and any necessary adapters:

npm install route-nest @route-nest/express

Basic Setup

Import and initialize Route Nest along with your framework-specific adapter:

import { initRouteNestTree } from 'route-nest'
import { initExpress } from '@route-nest/express-adapter'

async function startServer() {
  const app = initExpress(await initRouteNestTree('.'))
  app.listen(3000, () => console.log('Server listening on port 3000'))
}

startServer()

This setup assumes you have a directory called app at your project root, containing your route files structured in a way that Route Nest can understand.

🤝 Contributing

Contributions are always welcome! Whether it's adding new features, improving documentation, or reporting issues, please feel free to make a pull request or open an issue.

📄 License

Route Nest is MIT licensed. For more information, please see the LICENSE file.

FAQs

Package last updated on 26 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts