devlien
Version:
Devlien is a lightweight, zero-dependency Node.js framework with clean MVC structure, built-in ORM, and intuitive routing for rapid backend development.
20 lines (18 loc) • 570 B
JavaScript
import route from "devlien/route";
import Auth from "../app/Http/Middleware/Auth.js";
/**
* Register application routes.
*
* This file defines the HTTP routes for the application.
* Each route maps a URL path to a controller method.
*
* Route format: route.get('route-name', 'Controller@method')
*
* Example:
* GET request to '/' will be handled by DevlienController's index() method.
*/
export default route.serve(route => {
route.group({'prefix':'api', 'middleware':[Auth]}, (route)=>{
route.get('index', 'DevlienController@index');
})
});