@metamatter/nest
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Nest Logo

A Type Generation Library for building exportable backend type definition, easily to adopt in different TypeScript based backend development

NPM Version Package License NPM Downloads npms.io (quality) npms.io (maintenance) Codacy grade

Description

MetaMatter is a library for building runtime type definition generation. It is built with TypeScript and combines the concepts of Meta-Programming, to create type-safe, scalable environment for (mainly) Frontend development.

Philosophy

There are numbers of libraries for building a Node.js server-side applications. However, there is an issue when it comes to communicate between Frontend and Backend no matter which backend language we are using. Type Definitions, would be troublesome when it comes to Agile development style. Frequent updates on APIs makes it hard to develop projects in a type-safe environment.

MetaMatter aims to address this issue, by providing a lightweight, less configuration tools.

Installation

> yarn add @metamatter/core
# or
> npm install @metamatter/core

Plug and Play

If you want to use the package without any configuration. Do this.

import { MetaMatterModule } from "@metamatter/nest";

@Module({
    imports: [
        MetaMatterModule.forRoot({
            appModule: AppModule,
            globalPrefix: undefined,
        }),
    ],
})
export class AppModule {}

Send a GET request to /metamatter/api, and you can see a immediate result

> curl http://localhost:3000/metamatter/api

Usage

  • @Module()
  • @Controller()
  • @RequestBody(type)
  • @ResponseData(type?)
  • @ResponseArrayData(type?)

Package Sidebar

Install

npm i @metamatter/nest

Weekly Downloads

1

Version

1.1.2

License

MIT

Unpacked Size

78.1 kB

Total Files

74

Last publish

Collaborators

  • jamyth