UNPKG

3.73 kBMarkdownView Raw
1# tymly
2[![Tymly Package](https://img.shields.io/badge/tymly-package-blue.svg)](https://tymly.io/)
3[![npm (scoped)](https://img.shields.io/npm/v/@wmfs/tymly.svg)](https://www.npmjs.com/package/@wmfs/tymly)
4[![CircleCI](https://circleci.com/gh/wmfs/tymly-core.svg?style=svg)](https://circleci.com/gh/wmfs/tymly-core)
5[![codecov](https://codecov.io/gh/wmfs/tymly-core/branch/master/graph/badge.svg)](https://codecov.io/gh/wmfs/tymly-core)
6[![CodeFactor](https://www.codefactor.io/repository/github/wmfs/tymly-core/badge)](https://www.codefactor.io/repository/github/wmfs/tymly-core)
7[![Dependabot badge](https://img.shields.io/badge/Dependabot-active-brightgreen.svg)](https://dependabot.com/)
8[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
9[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
10[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/wmfs/tymly/blob/master/packages/pg-concat/LICENSE)
11[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fwmfs%2Ftymly-core.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fwmfs%2Ftymly-core?ref=badge_shield)
12
13
14> A framework for building and sharing workflows in Node.js.
15
16## <a name="install"></a>Install
17```bash
18$ npm install tymly --save
19```
20
21## <a name="usage"></a>Usage
22```javascript
23const tymly = require('tymly')
24
25const tymlyServices = await tymly.boot(
26 {
27 // Blueprints are structured directories that describe a business function.
28 // They contain 'state-machines' (e.g. Finite State Machines expressed in JSON as per Amazon State Machine specification: http://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-state-machine-structure.html)
29 // along with the resources required for those state-machines to run (e.g. data
30 // model definitions, images, form-layouts, templates etc.)
31 // This is just a simple list of directories where blueprints can be found...
32 blueprintPaths: [
33 '/tymly/blueprints/hr', // Some flows for HR-related things
34 '/tymly/blueprints/payroll' // Some flows for payroll-related activities
35 ],
36 excludeBlueprints: 'the-thing-that-should-not-be-blueprint'
37 // Tymly is extended via plugins, each in-turn offer 'services' and other components...
38 pluginPaths: [
39 '/tymly/plugins/tymly-express-plugin', // For accessing Tymly over HTTP/REST etc.
40 '/tymly/plugins/tymly-etl-plugin', // Adds import-from-CSV capabilities
41 '/tymly/plugins/tymly-pg-plugin' // Persist to PostgreSQL instead of the default in-memory solution
42 ],
43 excludePlugins: 'the-thing-that-should-not-be-plugin'
44 }
45)
46
47// Do something with those services...
48// (e.g. the 'tymly-express-plugin' provides an Express-powered 'server' service)
49const port = 3000
50services.server.listen(port, () => {
51 console.log(`Example app listening on port ${port}`);
52})
53```
54
55## <a name="why"></a>Why?
56
57Tymly has been developed as an alternative for organisations (especially non-profits and Government departments) who need continually-evolving business software - but can do without the complexity, expense and vendor lock-in that usually accompanies it.
58
59## <a name="documentation"></a>Documentation
60
61For documentation, please visit http://www.tymly.io/
62
63## <a name="tests"></a>Tests
64```bash
65$ npm test
66```
67
68## <a name="license"></a>License
69[MIT](https://github.com/wmfs/tymly/blob/master/LICENSE)
70
71
72[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fwmfs%2Ftymly-core.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fwmfs%2Ftymly-core?ref=badge_large)