easy-api.ts v3.2.1
EASY-API.TS
A powerful library to create your own API with ease.
Features
- 🚀 Optimized and advanced codes and functions.
- 📝 Easy to learn.
- 📚 Constant updates.
- 🔥 Image manipulation.
Install
npm i easy-api.ts
Check documentation here and join our support server.
Setup
const { API } = require('easy-api.ts');
const api = new API({
reverse: false
});
// Lets load our endpoints...
api.load('./routes').then(() => {
console.log('Source loaded.')
api.connect({ port: 4500 }) // Now we're starting the API bcuz the source is ready
});
Route example
module.exports["route"] = {
url: '/color',
method: "GET",
code: `
$ignore: [Check docs to see how does functions work ;)]
$if: [$or: [$query: [hex]==null;$isValidHex: [$query: [hex]]==false];
$reply: [
$setCode: [400]
$setType: [json]
$setBody: [{
"error": "Invalid hex color code provided"
}]
]
$break $ignore: [Now we're breaking it to stop executing the left code.]
]
$createCanvas: [
$setDimentions:[512;512]
$color:[$query:[hex]]
$drawRect:[0;0;512;512]
]
$reply:
[
$setCode: [200]
$setType: [canvas]
$setBody: [$default]
]
`
};
EASY-API.TS LICENSE
By using "easy-api.ts" you agree to the license terms and all conditions and consequences of not following these guidelines.
Declaration of rights
The complete code of "easy-api.ts" is copyrighted, and any unauthorized distribution of the code will be removed immediately.
Read-Only Code
The code is "read-only", this means that the code can only be used for reading purposes and cannot be modified, distributed, sublicensed or used to create derivative works.
Limitations of liability
We shall be excluded from any liability for damages or problems arising from the use of the code.
Intellectual identity protection
All intellectual property rights, including copyrights, patents, or other rights are and shall remain the exclusive property of Mid and any legal entity representing Mid.
Made with ❤️ by Moonlight Group
4 months ago
4 months ago
7 months ago
6 months ago
7 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
11 months ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago