@isentia/express

1.0.6 • Public • Published

@isentia/express

Quick Started

const express = require("@isentia/express");

const opts = {
  rateLimiter: {
    redis: {
      host: process.env.DEFAULT_REDIS_HOST || "localhost",
      port: process.env.DEFAULT_REDIS_PORT || 6379
    },
    config: {
      points: Number(process.env.DEFAULT_RATE_LIMIT_CONFIG_POINTS) || 1000,
      duration: Number(process.env.DEFAULT_RATE_LIMIT_CONFIG_DURATION) || 1
    }
  },
  restQueryParser: {
    maxLimit: Number(process.env.DEFAULT_REST_QUERY_COFNIG_MAX_LIMIT) || 100,
    defaultLimit:
      Number(process.env.DEFAULT_REST_QUERY_COFNIG_DEFAULT_LIMIT) || 20,
    maxPage: Number(process.env.DEFAULT_REST_QUERY_COFNIG_MAX_PAGE) || 10
  },
  settings: {
    auth: { secretKey: "_YOUR_SECRET_KEY_", expiresIn: "365d", saltRounds: 10 }
  },
  logger: console,
  models: {}
};
const server = express(opts);

Dependencies

Plugged 3rd middlewares

Custom middleware

Readme

Keywords

none

Package Sidebar

Install

npm i @isentia/express

Weekly Downloads

8

Version

1.0.6

License

UNLICENSED

Unpacked Size

220 kB

Total Files

32

Last publish

Collaborators

  • isentia