UNPKG

3.37 kBMarkdownView Raw
1# LSK.js – server-api
2
3> @lskjs/server-api – LSK server-api.
4
5[![LSK logo](https://badgen.net/badge/icon/MADE%20BY%20LSK?icon=zeit\&label\&color=red\&labelColor=red)](https://github.com/lskjs)
6[![NPM version](https://badgen.net/npm/v/@lskjs/server-api)](https://www.npmjs.com/package/@lskjs/server-api)
7[![NPM downloads](https://badgen.net/npm/dt/@lskjs/server-api)](https://www.npmjs.com/package/@lskjs/server-api)
8[![NPM Dependency count](https://badgen.net/bundlephobia/dependency-count/@lskjs/server-api)](https://bundlephobia.com/result?p=@lskjs/server-api)
9[![Have TypeScript types](https://badgen.net/npm/types/@lskjs/server-api)](https://www.npmjs.com/package/@lskjs/server-api)
10[![Have tree shaking](https://badgen.net/bundlephobia/tree-shaking/@lskjs/server-api)](https://bundlephobia.com/result?p=@lskjs/server-api)
11[![NPM Package size](https://badgen.net/bundlephobia/minzip/@lskjs/server-api)](https://bundlephobia.com/result?p=@lskjs/server-api)
12[![Package size](https://badgen.net//github/license/lskjs/lskjs)](https://github.com/lskjs/lskjs/blob/master/LICENSE)
13[![Ask us in Telegram](https://img.shields.io/badge/Ask%20us%20in-Telegram-brightblue.svg)](https://t.me/lskjschat)
14
15<!-- template file="scripts/templates/preview.md" start -->
16
17<!-- template end -->
18
19***
20
21<!-- # 📒 Table of contents -->
22
23# Table of contents
24
25* [⌨️ Install](#️-install)
26
27 * [Healthcheck examples](#healthcheck-examples)
28
29* [📖 License](#-license)
30
31* [👥 Contributors](#-contributors)
32
33* [👏 Contributing](#-contributing)
34
35* [📮 Any questions? Always welcome :)](#-any-questions-always-welcome-)
36
37# ⌨️ Install
38
39```sh
40# yarn
41yarn i @lskjs/server-api axios bluebird lodash
42
43# npm
44npm i @lskjs/server-api axios bluebird lodash
45```
46
47***
48
49## Healthcheck examples
50
51 healthchecks() {
52 return {
53 a: () => 123,
54 b: () => Bluebird.delay(100).then(() => 1234),
55 c: () => {
56 throw new Err('error');
57 },
58 d: () => Bluebird.delay(11000).then(() => 'slow'),
59 };
60 }
61
62# 📖 License
63
64This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
65
66# 👥 Contributors
67
68<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
69
70<!-- prettier-ignore-start -->
71
72<!-- markdownlint-disable -->
73
74<table>
75 <tr>
76 <td align="center"><a href="https://isuvorov.com"><img src="https://avatars2.githubusercontent.com/u/1056977?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Igor Suvorov</b></sub></a><br /><a href="lskjs/lskjs///commits?author=isuvorov" title="Code">💻</a> <a href="#design-isuvorov" title="Design">🎨</a> <a href="#ideas-isuvorov" title="Ideas, Planning, & Feedback">🤔</a></td>
77 </tr>
78</table>
79<!-- markdownlint-restore -->
80<!-- prettier-ignore-end -->
81<!-- ALL-CONTRIBUTORS-LIST:END -->
82
83# 👏 Contributing
84
851. Fork it (<https://github.com/yourname/yourproject/fork>)
862. Create your feature branch (`git checkout -b features/fooBar`)
873. Commit your changes (`git commit -am 'feat(image): Add some fooBar'`)
884. Push to the branch (`git push origin feature/fooBar`)
895. Create a new Pull Request
90
91# 📮 Any questions? Always welcome :)
92
93* [Email](mailto:hi@isuvorov.com)
94* [LSK.news – Telegram channel](https://t.me/lskjs)
95* [Спроси нас в телеграме ;)](https://t.me/lskjschat)