Simple API Router

Easily manage and integrate API routes with Express.

Installation

npm install @notnexx/n-sar

Usage

const express = require('express');
const loadRoutes = require('@notnexx/n-sar');

const app = express();
const PORT = 3000;

app.use(express.json());
loadRoutes(app);

app.listen(PORT, () => {
    console.log(`Server running at http://localhost:${PORT}`);
});

Generate a Sample Project

npx n-sar my-api-project

Generate API Client

npx n-sar export-routes http://localhost:3000