1.0.3 • Published 8 years ago
pancake-agent v1.0.3
pancake-agent
Overview
pancake-agent is an agent library to execute the PTC(Pancake Target Code), which is based on strongloop/loopback.
Pancake is a tool to generate PTC(Pancake Target Code) which can be executed by pancake-agent and exposes a loopback-compatible API.
PTC is an abbreviation of Pancake Target Code, which is the JSON files collection of an embedable DSL that expresses models what user defined in pancake documents.
Installation
$ npm install pancake-agent --save
Usage
const app = require('pancake-agent')(__dirname, () => {
// here we can access:
// - app.models
});
API
The pancake-agent library only exposes 1 main function as below arguments:
name | type | description |
---|---|---|
pathname | String | the pathname to load PTC |
onboot | Function | fired when app booted |
For more detail APIs, see Loopback API
License
MIT @ WeFlex, Inc