Skip to main content

Herbs2rpl

Herbs REPL

Getting started

Installing

 npm install herbs2repl

Using

srs/domain/usecases/_uclist.js:

module.exports = (injection) => {
return [
{ usecase: require('./createItem').createItem(injection), tags: { group: 'Items' } },
{ usecase: require('./updateItem').updateItem(injection), tags: { group: 'Items' } },
...
]
}

srs/infra/repl/index.js:

const usecases = require('../../domain/usecases/_uclist')
const repl = require('herbs2repl')

const main = async (injection) => {

// list of all use cases, initialized
const ucs = usecases(injection)

// your user for the REPL session
const user = {
canAddItem: true, canCreateList: true, canDeteleList: false,
canGetLists: true, canUpdateItem: true, canUpdateList: true
}

repl(ucs, user, {groupBy: "group"})
}

main().then()

Then run on your terminal:

 $ node ./src/infra/repl

Contribute

Come with us to make an awesome herbs2repl.

Now, if you do not have the technical knowledge but intend to help us, do not feel shy, click here to open an issue and collaborate with ideas. This contribution could be a criticism or a compliment (why not?)

If you would like to help contribute to this repository, please see CONTRIBUTING

License

herbsshelf is released under the MIT license