easier-apis
v1.0.4
Published
Making APIs Easier- And better.
Readme
Easier Apis
By Anthony Maxwell
Table of Contents
Introduction
Easier APIs is a platform based on express that allows you to make apis easily.
Requirements
- Node.js 18.17.0 or above
- Express 4.19.0 or above
- Multer 2.0.0-rc.1 or above
Installation Guide
npm install easier-apis: It's that simple.
Usage
Easier Apis is based on the library express, and uses multer for file managment. Begin by importing Easier Apis and Express:
const easierApis = require('easier-apis');
const express = require('express');Initialize an application and api for both:
const app = express();
const api = easierApis();Now, link the express app to the api.
api.attach(app);You are now attached, and can use the api!
You can setup an enpoint by calling the endpoint function as follows:
api.endpoint({ url: "/endpoint/:parameter" }, (req, res, params) => {
res.send(`you entered the parameter: ${params.parameter}`);
});You will need to run the express app as normal:
app.listen(3000, () => console.log('Server running on port 3000'));FAQ (Frequently Asked Questions)
There is currently no FAQs, as this is the first version. Submit issues on the github, and questions on Stack Overflow or other sites tagged #easierApis
License
- Share: copy and redistribute the material in any medium or format for any purpose, even commercially.
- Adapt: remix, transform, and build upon the material for any purpose, even commercially. The licensor cannot revoke these freedoms as long as you follow under the following license terms:
- Attribution: You must give appropriate credit , provide a link to the license, and indicate if changes were made . You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
- You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
- No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
