peque.ts
TypeScript icon, indicating that this package has built-in type declarations

1.0.19 • Public • Published

Peque.ts

coverage

This framework is built on-top of Express and is intended to provide a standard to help the design, development, and life-cycle management of scalable and efficient server-side web application (with Node.js). It can also be used to invert the control in a pre-existent Express application.

Install

npm i peque.ts

Node version

The usage of the Node.js LTS version is required.

Documentation

Documentation

Server

import { TestRootModule } from './modules/root/test-root.module';
import { ExpressFactory } from 'peque.ts';

import * as bodyParser from 'body-parser';
import * as cors from 'cors';

async function startUp() {
  await ExpressFactory.createServer({
      rootModule: TestRootModule,
      globalMiddlewares: {
        preRoutes: [
          bodyParser.urlencoded({ extended: true }),
          bodyParser.json({ limit: '2m' })
        ],
        postRoutes: [cors]
      },
      swagger: {
        folder: '/doc',
        info: {
          title: 'Test API',
          description: 'Test API description',
          contacts: {
            name: 'Simone Di Cicco',
            email: 'simone.dicicco@gmail.com'
          },
          version: '1.0.0'
        },
        servers: [{ url: 'https://api.test.com/'}],
        tags: [
          {
            name: 'Tag',
            description: 'Description'
          }
        ]
      },
      isCpuClustered: false
    }
  );
}

startUp();

Examples

https://github.com/ukaoskid/peque-fwork/tree/main/sample

Readme

Keywords

none

Package Sidebar

Install

npm i peque.ts

Weekly Downloads

0

Version

1.0.19

License

ISC

Unpacked Size

408 kB

Total Files

418

Last publish

Collaborators

  • devinquenti