{"id":21451165,"url":"https://github.com/lenra-io/app-lib-js","last_synced_at":"2026-02-07T06:02:01.497Z","repository":{"id":153495325,"uuid":"627477904","full_name":"lenra-io/app-lib-js","owner":"lenra-io","description":"Lenra's app lib for JavaScript and TypeScript apps","archived":false,"fork":false,"pushed_at":"2024-10-28T11:50:58.000Z","size":367,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-31T18:56:07.267Z","etag":null,"topics":["app-lib","javascript","lenra","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lenra-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["lenra-io"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-04-13T14:47:42.000Z","updated_at":"2024-08-14T09:27:18.000Z","dependencies_parsed_at":"2024-08-14T08:32:06.516Z","dependency_job_id":"d2dc41a9-76c5-4293-a586-1631e05d9b4e","html_url":"https://github.com/lenra-io/app-lib-js","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fapp-lib-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fapp-lib-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fapp-lib-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fapp-lib-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lenra-io","download_url":"https://codeload.github.com/lenra-io/app-lib-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225998893,"owners_count":17557484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app-lib","javascript","lenra","typescript"],"created_at":"2024-11-23T04:18:28.124Z","updated_at":"2026-02-07T06:02:01.143Z","avatar_url":"https://github.com/lenra-io.png","language":"TypeScript","funding_links":["https://github.com/sponsors/lenra-io"],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\u003c!--\n*** This README was created with https://github.com/othneildrew/Best-README-Template\n--\u003e\n\n\n\n\u003c!-- PROJECT SHIELDS --\u003e\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n\n\u003ch3 align=\"center\"\u003eApp Lib for javaScript based projects\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    This lib integrates Express server and all the elements the app needs in order to only keep the views, listeners and resources in the app project.\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/lenra-io/app-lib-js/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/lenra-io/app-lib-js/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\nTo incorporate it into your Lenra app project, simply run the following command:\n```console\nnpm i @lenra/app-server\n```\n\n### Lenra API calls\n\nTo call a Lenra API from a listener, utilize the `Api` instance provided as the third parameter in your listener function. \n\nYou can then create a document using the data API with the following code:\n```js\nclass CustomType extends Data {\n    /**\n     * @param {string} value\n     */\n  constructor(value) {\n    this.value = value;\n  }\n}\n\nconst myDoc = await api.data.coll(CustomType).createDoc(new CustomType(\"Hello world\"));\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please open an issue with the tag \"enhancement\".\nDon't forget to give the project a star if you liked it! Thanks again!generate\n\n### Generate classes\n\nA part of this lib is generated from the [Lenra API](https://github.com/lenra-io/api).\nTo generate the classes, run the following commands:\n\n```bash\n# Load API\n## With wget\nwget https://github.com/lenra-io/api/releases/latest/download/load-api.sh -O - -q | bash\n## With curl\ncurl -fsSL https://github.com/lenra-io/api/releases/latest/download/load-api.sh | bash\n# generate\nnpm run generate\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the **MIT** License. See [LICENSE](./LICENSE) for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nLenra - [@lenra_dev](https://twitter.com/lenra_dev) - contact@lenra.io\n\nProject Link: [https://github.com/lenra-io/app-lib-js](https://github.com/lenra-io/app-lib-js)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/lenra-io/app-lib-js.svg?style=for-the-badge\n[contributors-url]: https://github.com/lenra-io/app-lib-js/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/lenra-io/app-lib-js.svg?style=for-the-badge\n[forks-url]: https://github.com/lenra-io/app-lib-js/network/members\n[stars-shield]: https://img.shields.io/github/stars/lenra-io/app-lib-js.svg?style=for-the-badge\n[stars-url]: https://github.com/lenra-io/app-lib-js/stargazers\n[issues-shield]: https://img.shields.io/github/issues/lenra-io/app-lib-js.svg?style=for-the-badge\n[issues-url]: https://github.com/lenra-io/app-lib-js/issues\n[license-shield]: https://img.shields.io/github/license/lenra-io/app-lib-js.svg?style=for-the-badge\n[license-url]: https://github.com/lenra-io/app-lib-js/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenra-io%2Fapp-lib-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flenra-io%2Fapp-lib-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenra-io%2Fapp-lib-js/lists"}