A semi-advanced Express.js framework by Bracketed Softworks! This is a package built revolving around Express.js to allow the easy usage of Express' API and adding extra things like built in middlewares, event listeners etc.
Documentation & Guide available at https://jova.js.org, the majority of the content which used to be part of our README.md is now at our js.org website.
- A Framework package built for Express.js that uses @bracketed/logger for logging. - It utilises a range of packages to bring you the best experience!
Install via yarn
or npm
:
Yarn:
yarn add @bracketed/jova.js
Npm:
npm install --save @bracketed/jova.js
Jova.js has a specific file structure it works by, this is shown below:
project
β index.ts
β
ββββevents
β β Ready.ts
β β Error.ts
β β ...
β β
β ββββmore-events (subfolders are supported)
β β Mount.ts
β β Route.ts
β β ...
β
ββββroutes (subfolders are supported)
β β Route.ts
β β Index.ts
β β ...
β
ββββmiddlewares (subfolders are supported)
β β Middleware1.ts
β β Middleware2.ts
β β ...
β
ββββstatic (subfolders are supported)
β file1.css
β file2.txt
β ...
Jova.js also has two other exports, @bracketed/jova.js/types
and @bracketed/jova.js/decorators
.
@bracketed/jova.js/decorators
- For decorators usage in handlers such as route handlers, event handlers and middleware handlers.@bracketed/jova.js/types
- Typings for Jova.js, used in routes, middlewares, events etc.
Initiating a new Jova Server.
// ESM
import { JovaServer } from '@bracketed/jova.js';
const Jova = new JovaServer();
await Jova.listen(3000);
// CJS
const { JovaServer } = require('@bracketed/jova.js');
const Jova = new JovaServer(); // All options for JovaServer are documented in the instance as jsDocs
await Jova.listen(3000);
You can find an application example in the Jova.js repository here or the direct folder here.
The default Express API can be utilised from the default Jova instance after being initiated e.g: get(), post(), etc or via the container
object exported by @bracketed/jova.js
.
However, you can set up routes, middlewares and event listeners like this:
Events - Via the documentation at jova.js.org
Routes - Via the documentation at jova.js.org
Middlewares - Via the documentation at jova.js.org
Feel free to contribute to this project, join our discord and help us with future developments of Project Bracketed & Packages by Bracketed Softworks. Please also notify us of errors within our projects as we may not be aware of them at the time.