![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
kamboja-core
Advanced tools
KambojaJS aims to fix some problems occurs when using the old guy, like increase testability, add convention over configuration and use modern language feature like async/await decorator etc, read more http://kambojajs.com/
KambojaJS route generation system generate url using pattern below:
<namespace>/<controller>/<action>?<parameter1>=value&<parameter2>=value
Example you define controller like below
import { Controller } from "kamboja"
export namespace Api.v01
export class UserController extends Controller {
list(query:string, offset:number, limit:number){ }
}
}
Above code by default will generate a GET url below
/api/v01/user/list?query=<value>&offset=<value>&limit=<value>
Refer to controller reference for more information
For more advanced use, KambojaJS provide a convention for creating Restful API by using ApiController
Example controller below will create Restful API url for you
import { ApiController } from "kamboja"
namespace Api.V1 {
export class ItemsController extends ApiController {
//GET /api/v1/items/:id
get(id:string) { }
//GET /api/v1/items?offset=1&limit=<optional>
list(offset:number, limit=50){ }
//POST /api/v1/items
add(data){ }
//DELETE /api/v1/items/:id
delete(id:string){ }
//PUT /api/v1/items/:id
replace(id:string, data){ }
//PATCH /api/v1/items/:id
modify(id:string, data){}
}
}
Above code will generate some urls:
GET /api/v1/items/:id
GET /api/v1/items?offset=1&limit=<optional>
POST /api/v1/items
DELETE /api/v1/items/:id
PUT /api/v1/items/:id
PATCH /api/v1/items/:id
Refer to ApiController for more information
FAQs
Core library of KambojaJS
The npm package kamboja-core receives a total of 0 weekly downloads. As such, kamboja-core popularity was classified as not popular.
We found that kamboja-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.