An open API service indexing awesome lists of open source software.

https://github.com/bracketed/jova.js

A semi-advanced Express.js framework by Bracketed Softworks! πŸŽ‰πŸŽ‰
https://github.com/bracketed/jova.js

expressjs framework javascript nodejs typescript

Last synced: 9 months ago
JSON representation

A semi-advanced Express.js framework by Bracketed Softworks! πŸŽ‰πŸŽ‰

Awesome Lists containing this project

README

          


Bracketed logo


Bracketed Softworks - Website | Discord | Github


@bracketed/jova.js

A semi-advanced Express.js framework by Bracketed Softworks!
This is a package built revolving around [Express.js](https://www.npmjs.com/package/express) to allow the easy usage of Express' API and adding extra things like built in middlewares, event listeners etc.

Documentation & Guide available at , **the majority of the content which used to be part of our README.md is now at our js.org website**.

What is this?

\- A Framework package built for [Express.js](https://www.npmjs.com/package/express) that uses [@bracketed/logger](https://www.npmjs.com/package/@bracketed/logger) for logging.
\- It utilises a range of packages to bring you the best experience!

Summary (Directory)

- [Installation](#Installation)

- [Yarn](#YarnInstall)
- [Npm](#NpmInstall)
- [Usage](#Usage)
- [Contribution](#Contribution)

Installation

Install via `yarn` or `npm`:

Yarn:

```sh
yarn add @bracketed/jova.js
```

Npm:

```sh
npm install --save @bracketed/jova.js
```

Usage

Jova.js has a specific file structure it works by, this is shown below:

```txt
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.

```typescript
// ESM
import { JovaServer } from '@bracketed/jova.js';

const Jova = new JovaServer();

await Jova.listen(3000);
```

```typescript
// 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](https://github.com/bracketed/jova.js) or the direct folder [here](https://github.com/Bracketed/jova.js/tree/master/test).

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](https://jova.js.org/docs/Guide/Events)

**Routes** - [Via the documentation at jova.js.org](https://jova.js.org/docs/Guide/Routes)

**Middlewares** - [Via the documentation at jova.js.org](https://jova.js.org/docs/Guide/Middlewares)

Contribution & Help

Feel free to contribute to this project, join our [discord](https://discord.com/invite/JZ4939cvMT) 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.



Thanks for using our packages!


Bracketed logo
Bracketed Softworks - Website | Discord | Github | Twitter | Back To The Top




Discord Banner