# betiny-core

> Distribuable version of Betiny engine as module

Latest version **1.1.3** (published 2022-10-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install betiny-core
pnpm add betiny-core
yarn add betiny-core
bun add betiny-core
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2022-10-06 |
| First published | 2022-08-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 256.4 KB |
| Known vulnerabilities | 0 (+7 in 1 direct dependencies) |
| Install scripts | no |
| Author | Braije Christophe |
| Maintainers | braije |
| Keywords | betiny, core, engine, wrapper |

## Links

- npm: https://www.npmjs.com/package/betiny-core
- Repository: https://github.com/Braije/betiny-core
- Homepage: https://github.com/Braije/betiny-core#readme
- Issues: https://github.com/Braije/betiny-core/issues
- npm.io page: https://npm.io/package/betiny-core

## Dependencies (6)

- [dotenv](https://npm.io/package/dotenv.md) ^8.0.0
- [helmet](https://npm.io/package/helmet.md) ^6.0.0
- [mysql2](https://npm.io/package/mysql2.md) ^1.6.5
- [express](https://npm.io/package/express.md) ^4.17.1
- [ioredis](https://npm.io/package/ioredis.md) ^5.2.3
- [compression](https://npm.io/package/compression.md) ^1.7.4

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2022-10-06
- 1.1.2 — 2022-09-30
- 1.1.1 — 2022-09-19
- 1.1.0 — 2022-09-18
- 1.0.9 — 2022-09-17
- 1.0.8 — 2022-09-17
- 1.0.7 — 2022-09-16
- 1.0.6 — 2022-09-13
- 1.0.5 — 2022-08-23
- 1.0.4 — 2022-08-22
- 1.0.2 — 2022-08-21
- 1.0.1 — 2022-08-21
- 1.0.0 — 2022-08-21

## README

<p>
<img width="240" src="./docs/logo.svg">
</p>

# About
A framework using a custom wrapper API to reduce the amount of dependencies and enforce the security. The goal is to greatly simplify the common tools with a friendly syntax and separate the framework architecture from the business logic.

Less code is better :)

![betiny](./docs/betiny.jpg)

### Dependencies
We try to reduce the amount of dependencies as much as possible by using the standart module.

## Install
As usual ... 

    yarn add betiny-core

... create your own ".env" and fill it with your own informations

    NODE_ENV=dev

    # TODO: Allow range?
    HTTP_PORT=3001
    HTTP_HOST=127.0.0.1

    # File system will be restricted to this folder path.
    TEMP_PATH=
    
    # As usual.
    MYSQL_HOST=localhost
    MYSQL_PORT=3306
    MYSQL_USER=root
    MYSQL_PASSWORD=
    MYSQL_CONNECTION_LIMIT=100
    MYSQL_DATABASE=betiny

You can also use the [boilerplate](https://github.com/Braije/betiny-boilerplate) or start with this basic example:

    const $ = require('betiny-core')

    $.middleware.add("myCustom", 200, (req, res, next) => {
        // Any ...
        next()
    })

    $.route.get('/', (req, res, next) => {
        res.send("My root path serve.r")
    })

    $.arguments.add('myCommand', async () => {
        // Any ...
        process.exit()
    })

    $.server.start()

# API

- Main process
    - [Server](./api/core/server.md)
    - [Routes](./api/core/routes.md)
    - [Middleware](./api/core/middleware.md)
        - [Session](./api/core/session.md)
- Child process
    - [Arguments](./api/core/arguments.md)
    - Workers
    - Cron
- Database
    - [Mysql](./api/core/mysql.md)
    - Elastic Search
    - MongoDB
- Utils
    - [Console draw](./api/core/log.md)
    - [File system](./api/core/files.md)
    - [Queue](./api/core/queue.md)
    - [Events](./api/core/events.md)
    - Message

---
_Source: https://npm.io/package/betiny-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
