restjscrudonapi
v1.0.0
Published
A simple RESTful API for performing CRUD operations on JSON files using jscrudon module.
Downloads
2
Maintainers
Readme
restjscrudonapi
A simple RESTful API for performing CRUD operations on JSON files using the jscrudon module.
Installation
You can install restjscrudonapi
via npm:
npm install restjscrudonapi
Usage
const createJSONApi = require('restjscrudonapi');
const filePath = 'data.json';
const port = 3000;
createJSONApi(filePath, port);
This will start a server at http://localhost:3000 where you can access the RESTful API endpoints for JSON data.
API
- POST /api/data: Create a new entry.
- GET /api/data: Read all entries.
- GET /api/data/:id: Read a specific entry.
- PUT /api/data/:id: Update a specific entry.
- DELETE /api/data/:id: Delete a specific entry.
License
This project is licensed under the MIT License - see the LICENSE file for details.