API-BOX is a lightweight Node.js package that simplifies the process of creating RESTful APIs with pre-configured routes and database integration. It provides a set of pre-built routes for common CRUD operations (Create, Read, Update, Delete), making it easy for developers to set up APIs without writing repetitive code.
- Pre-configured routes for CRUD operations
- Database integration with customizable models
- Easy setup and integration with Express.js
- Error handling and validation support
- Middleware support for authentication and authorization (coming soon)
Install api-box-dex with npm
npm install api-box-dex
const express = require("express");
const bodyParser = require("body-parser");
const { api } = require("api-box-dex");
const app = express();
app.use(bodyParser.json());
app.use("/api", api);
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
});
GET /api/items
GET /api/items/:id
POST /api/items
PUT /api/items/:id
DELETE /api/items/:id
Contributions are always welcome!
You can customize the behavior of API-BOX by extending the provided models or by adding middleware to the Express app.
API-BOX is licensed under the MIT License. See the LICENSE file for details.