# coalcodes-route-builder

> A library to create routes based on comments (like symfony) or configurations (like yaml, json, etc)

Latest version **0.0.0-beta.2** (published 2022-09-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install coalcodes-route-builder
pnpm add coalcodes-route-builder
yarn add coalcodes-route-builder
bun add coalcodes-route-builder
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0-beta.2 |
| Published | 2022-09-15 |
| First published | 2022-08-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 21.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | meyler.it |
| Maintainers | j-ponce |
| Keywords | coal, coalcodes, coal-codes, route, controller, mvc, express, api, rest |

## Links

- npm: https://www.npmjs.com/package/coalcodes-route-builder
- npm.io page: https://npm.io/package/coalcodes-route-builder

## Dependencies (1)

- [espree](https://npm.io/package/espree.md) ^9.3.3

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 0.0.0-beta.2 (latest) — 2022-09-15
- 0.0.0-beta.1 — 2022-08-29

## README

# CoalCodes Route Builder

A tool to make easier the creation of routes inside most frameworks.\
Simple to use and customizable

## Installation
Install this package using [NPM](https://www.npmjs.com/).

As a good practice it is recommended to install as development dependency because this module
create all files necessary for the routing, you can bring these files to production.

```bash
npm install --save-dev coalcodes-route-builder
```

## Usage

```js
import builder from 'coalcodes-route-builder';
builder(`path/to/controllers`, `path/to/routes`);
```

### Builder Class
```js
import {Builder} from 'coalcodes-route-builder';

let apiV1 = new Builder(`api/v1/controllers`, `api/v1/routes`);
apiV1.build();

let apiV2 = new Builder(`api/v2/controllers`, `api/v2/routes`);
apiV2.build();
```

### Route Class
```js
import {Route} from 'coalcodes-route-builder';

let customRoute = new Route(`api/v1/controllers`, `api/v1/routes`);
```

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