@axa/bautajs-express
TypeScript icon, indicating that this package has built-in type declarations

4.0.0-alpha.0 • Public • Published

bautajs-express

A Express.js plugin for Bauta.js.

How to install

  npm install @axa/bautajs-express

Usage

const express = require('express');
const { BautaJSExpress } = require('@axa/express');
const apiDefinition = require('../../api-definition.json');

const app = express();
const bautaJSExpress = new BautaJSExpress({ apiDefinition });
const router = await bautaJSExpress.buildRouter();

app.use('/v1', router);

app.listen(3000, err => {
  if (err) throw err;
  console.info('Server listening on localhost: 3000');
});

See a full example on Example of a project from scratch.

Validation

Fastify has an out-of-the-box request validation, therefore the builtin Bauta.js request validations are disabled on this plugin.

Legal Notice

Copyright (c) AXA Group. All rights reserved. Licensed under the (MIT / Apache 2.0) License.

Third party dependencies licenses

Production

Development

Package Sidebar

Install

npm i @axa/bautajs-express

Weekly Downloads

1

Version

4.0.0-alpha.0

License

SEE LICENSE IN LICENSE.txt

Unpacked Size

51 kB

Total Files

35

Last publish

Collaborators

  • bernat-bautista
  • aldodfm
  • xavier-redondo
  • francisco.herrero
  • carlos-navarro
  • fran-herrero
  • philippethongaxa