# APIlite A set of tools to simplify the work of creating backend APIs for your frontend projects. Includes tutorials, patterns and practical examples for creating projects based on REST APIs. ## Installation Download source code and add to your project ```php You can also download generated frontend clients: * JavaScript: `?format=javascript` * TypeScript (typed for Vue/TS projects): `?format=typescript` JavaScript usage example: ```js import backend from './backend.js'; backend.add(1, 2).then((response) => { console.log(response.data); }); ``` TypeScript usage example (Vue + TS): ```ts import backend from './backend'; backend.add(1, 2).then((response) => { console.log(response.data); // typed value based on PHP return type }); ``` These outputs can also be generated in command line: * HTML: `$> php APIcalculator.php --html` * JavaScript: `$> php APIcalculator.php --javascript > backend.js` (`--js` alias is available) * TypeScript: `$> php APIcalculator.php --typescript > backend.ts`