express-enrouten-async
v1.4.10
Published
Route configuration for express apps made easy with async support.
Downloads
20
Maintainers
Readme
express-enrouten-async
Route configuration for express apps made easy with async support.
Installation
npm install express-enrouten-asyncUsage
const express = require('express');
const enrouten = require('express-enrouten-async');
const app = express();
async function init() {
await enrouten(app, {
directory: 'routes'
});
app.listen(3000, () => {
console.log('Server started on port 3000');
});
}
init().catch(err => console.error(err));Features
- Async/Await support for route initialization.
- Automatic route discovery.
- Middleware integration.
License
MIT
