@forrestjs/core
v5.2.2
Published
ForrestJS is the Javascript plugin syste.
Downloads
9,275
Maintainers
Readme
@forrestjs/core
ForrestJS helps you build a Modular JavaScript Application where you can (almost) forget about the infrastructure and FOCUS ON YOUR BUSINESS VALUE.
Install & Setup
npm add @forrestjs/core
Quick Code Example
https://codesandbox.io/p/sandbox/service-fastify-th8dq?file=%2Fsrc%2Findex.js
const forrest = require('@forrestjs/core');
const fastify = require('@forrestjs/service-fastify');
forrest.run({
// Add ForrestJS wrappers to famous and useful libraries
services: [fastify],
// Integrate your Business Logic with the running services
features: [{
target: '$FASTIFY_ROUTE',
handler: {
method: 'GET',
url: '/',
handler: async () => 'Hello World',
},
}],
// Provide configuration to Services and Features
settings: {
fastify: {
port: '8080'
}
}
]);