npm

@lenra/app-server
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.6 • Public • Published

Contributors Forks Stargazers Issues MIT License


App Lib for javaScript based projects

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.

Report Bug · Request Feature

Usage

To incorporate it into your Lenra app project, simply run the following command:

npm i @lenra/app-server

Lenra API calls

To call a Lenra API from a listener, utilize the Api instance provided as the third parameter in your listener function.

You can then create a document using the data API with the following code:

class CustomType extends Data {
    /**
     * @param {string} value
     */
  constructor(value) {
    this.value = value;
  }
}

const myDoc = await api.data.createDoc(new CustomType("Hello world"));

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please open an issue with the tag "enhancement". Don't forget to give the project a star if you liked it! Thanks again!

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Lenra - @lenra_dev - contact@lenra.io

Project Link: https://github.com/lenra-io/app-lib-js

(back to top)

Package Sidebar

Install

npm i @lenra/app-server

Weekly Downloads

1

Version

1.0.0-beta.6

License

MIT

Unpacked Size

64.6 kB

Total Files

54

Last publish

Collaborators

  • flavien_lenra
  • taorepoara