# route-access

> it create route directory somewhere for creating route file and route and route code without import and require for each file in main.js, it's for express js

Latest version **1.0.1** (published 2022-08-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install route-access
pnpm add route-access
yarn add route-access
bun add route-access
```

## 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.0.1 |
| Published | 2022-08-06 |
| First published | 2022-08-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lb Madesia |
| Maintainers | lbmadesia |
| Keywords | route-access |

## Links

- npm: https://www.npmjs.com/package/route-access
- Repository: https://github.com/lbmadesia/route-access
- Homepage: https://github.com/lbmadesia/route-access#readme
- Issues: https://github.com/lbmadesia/route-access/issues
- npm.io page: https://npm.io/package/route-access

## Recent versions

- 1.0.1 (latest) — 2022-08-06
- 1.0.0 — 2022-08-05

## README

# Route access module

It is best module for Route, you can create many folders and many files anywhere through this module no need to import of route file in root js file, even it work as tree structure,



### Install Dependencies

Step 1.
```
npm i route-access
```
Step 2.
```
npm install express
```

Step 3. ### index.js

```
const express = require('express');
const routeAccess  = require('route-access');

const app = express();

const routePath = 'backend/routes';
routeAccess.access(app,routePath).then((res)=>{
  app.listen(8080);
}).catch((error)=>{
  console.log('Route Build Error : ',error);
});
```


## info
you can also prefix route base on directory it's optional parameter  as if 'panel'is directory name and admin is prefix value.

```
const routePrefix = {'panel':'admin'};
const routePath = 'backend/routes';
routeAccess.access(app,routePath,routePrefix).then((res)=>{
  app.listen(8080);
}).catch((error)=>{
  console.log('Route Build Error : ',error);
});
```

## Issues

If you come across any issues please report them [here](https://github.com/lbmadesia/route-access/issues).

## Contributing
Feel free to create any pull requests for the project. For proposing any new changes or features you want to add to the project, you can send us an email at following addresses.

    (1) Lb Madesia - lbmadesia@gmail.com

# License
This route-access is open-sourced Module licensed under the MIT license

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