👋 Welcome

This documentation is designed to be comprehensive and user-friendly, guiding you through every step of using MetaRoute. Whether you're starting your journey in API development or you're an experienced developer looking to enhance your projects, you'll find valuable insights and tips here.

# About MetaRoute

MetaRoute is a passion project aimed at simplifying API development. It's a lightweight, fully-featured API framework that leverages decorators for a clean and intuitive coding experience. Built with minimalism in mind, MetaRoute requires only one dependency reflect-metadata for TypeScript metadata reflection.

# Why use MetaRoute?

Who is this Framework for? MetaRoute is designed for developers who are looking for a simple, yet powerful API framework that is easy to use. The framework is ideal for fast prototyping and MVP development, as well as for building production-ready applications. The whole idea behind MetaRoute is to provide a minimalistic, yet fully-featured API framework that allows developers to focus on building their applications, rather than spending time on boilerplate code and complex configurations.

# Key Features

  • ⭐ Minimalistic design with nearly zero dependencies
  • ⭐ Support for real-time applications with a custom WebSocket implementation
  • ⭐ Easy-to-use decorator-based configuration
  • ⭐ Built-in support for both HTTP and HTTPS servers
  • ⭐ Flexible middleware integration
  • ⭐ Customizable error handling
  • ⭐ Simple, yet powerful routing

# Quick Start

Get up and running with MetaRoute in just a few steps:

npm install metaroute-ts

Or, if you're using Yarn:

yarn add metaroute-ts

Start building your API by decorating a class with the @App decorator and extending the Application class.

@App({})
export class MetaApp extends Application {}

# App Configuration

Configure your MetaRoute application by providing an object that implements the AppConfiguration interface. This object can contain the following properties:

interface AppConfiguration {
    middleware?: Middleware[];
    errorMiddleware?: ErrorMiddleware[];
    port?: number;
    ssl?: {
        key: string;
        cert: string;
    };
    engine?: ServiceIdentifier<Engine>;
    initializers?: ServiceIdentifier<Initializable>[];
    imports?: ServiceIdentifier<any>[];
    logging?: Omit<LoggerOptions, "context">;
}

# Contributing

MetaRoute is an open-source project, and built with collaboration in mind. We welcome contributions from the community, and encourage you to get involved. If you'd like to contribute to the project, check out our CONTRIBUTING.md file for more information. Or just open a pull request on GitHub!

Made withandbyEmil Ölund
© 2024 MIT