# auto-routes-express

> generate router automatically by file path for express

Latest version **1.0.0** (published 2018-03-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install auto-routes-express
pnpm add auto-routes-express
yarn add auto-routes-express
bun add auto-routes-express
```

## 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.0 |
| Published | 2018-03-09 |
| First published | 2018-03-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | adoug |
| Maintainers | adoug |
| Keywords | express, router |

## Links

- npm: https://www.npmjs.com/package/auto-routes-express
- Repository: https://github.com/garfileds/auto-router
- Homepage: https://github.com/garfileds/auto-router#readme
- Issues: https://github.com/garfileds/auto-router/issues
- npm.io page: https://npm.io/package/auto-routes-express

## 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

- 1.0.0 (latest) — 2018-03-09

## README

# auto-router
auto router by file path for express

# auto-router
auto router by file path for express

if you have a file named `user.js` in `routes/api`, `auto-router` will do this:
```javascript
app.use('/api/user', require('path/to/user.js'))

// for the file 'routes/index.js'
app.use('/', require('path/to/index.js'))
```

# Install

```bash
 npm install auto-router --save-dev
```

# Usage

```JavaScript
const app = require('express')
const AutoRouter = require('auto-routes-express')

AutoRouter.init(app, path.join(__dirname, 'path/to/routes'))
```

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