@overlook/core v0.10.0
DEPRECATED: Overlook framework core
This module is no longer required.
Routes are now the fundamental building blocks of an Overlook app.
Part of the Overlook framework.
Abstract
Overlook is a Javascript web framework.
It is composed of many modules which can be used together to build a fully-featured app. This module is the (very minimal) core.
This document only describes the methods of the core module. Please see other modules for documentation on each, or overlookjs.github.io for an overview.
Usage
Create app
const Overlook = require('@overlook/core');
const app = new Overlook();
Routes
The Route class defined by @overlook/route is exported as Overlook.Route
.
See the docs for Route class methods here.
.attachRouter( router )
Attach a router to the app.
const { Route } = Overlook;
const router = new Route();
app.attachRouter( router );
Initialization
.init()
Initialize the app.
This calls .init()
on the router, passing the app as argument.
See here for details of the router initializaton process.
Handling requests
.handle( req )
Handle request.
This calls .handle()
on the router, passing the request as argument.
Versioning
This module follows semver. Breaking changes will only be made in major version updates.
All active NodeJS release lines are supported (v10+ at time of writing). After a release line of NodeJS reaches end of life according to Node's LTS schedule, support for that version of Node may be dropped at any time, and this will not be considered a breaking change. Dropping support for a Node version will be made in a minor version update (e.g. 1.2.0 to 1.3.0). If you are using a Node version which is approaching end of life, pin your dependency of this module to patch updates only using tilde (~
) e.g. ~1.2.3
to avoid breakages.
Tests
Use npm test
to run the tests. Use npm run cover
to check coverage.
Changelog
See changelog.md
Issues
If you discover a bug, please raise an issue on Github. https://github.com/overlookjs/core/issues
Contribution
Pull requests are very welcome. Please:
- ensure all tests pass before submitting PR
- add tests for new features
- document new functionality/API additions in README
- do not add an entry to Changelog (Changelog is created when cutting releases)
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago