@webfocus/app

0.2.17 • Public • Published

Webfocus Logo

Webfocus

This module defines the WebfocusApp class to help in the creation of NodeJS servers using express and Pug.

The main idea of this module is to enable the creation of independet components with the WebfocusComponent class (see @webfocus/component) and the creation of applications with WebfocusApp class using said components.

Specifically, the WebfocusApp creates an express server internaly. Allows you to register specific components to the server. To use it const WebfocusApp = require('@webfocus/app');. More information of the WebfocusApp.

Getting Started

On your current project:

npm install @webfocus/app

Or use the initializer:

npm init @webfocus/app

The later will create a template WebfocusApp (the package.json and index.js files)

Usage

let WebfocusApp = require('@webfocus/app');

let webfocusApp = new WebfocusApp(options);

webfocusApp.registerComponent(webfocusComponentInstance1);
webfocusApp.registerComponent(webfocusComponentInstance2);
// ...
webfocusApp.registerComponent(webfocusComponentInstanceN);

webfocusApp.start();

In the repository we do end-to-end tests with cypress tests on an sample implementation.

Package Sidebar

Install

npm i @webfocus/app

Weekly Downloads

0

Version

0.2.17

License

MIT

Unpacked Size

49.9 kB

Total Files

16

Last publish

Collaborators

  • diogoalmiro