FriendOS Remote
An operating system that just might be your friend
Requirements
- node v4.x
Usage
var FriendOS = ; var app = license: "YOUR_LICENSE_KEY" remote: "http://friendos-remote.friendlybotinc.com:8081"; appstart;
You must create the following directories and files in your project:
- library/ (must contain at least 1 module)
- starters/ (must contain at least 1 module)
- intents.csv
Installation
$ npm install friendos-remote
Quick Start
Create your package.json
$ npm init
Install the library
$ npm install friendos-remote --save
Install some sample modules and their requires
$ bash ./node_modules/friendos-remote/scripts/setup.sh
Create your /app.js
var FriendOS = ; var app = license: "YOUR_LICENSE_KEY" remote: "http://friendos-remote.friendlybotinc.com:8081"; appstart;
Start the server:
$ node app.js
Go to localhost:8000/cma.html and say "Hi"
Required Files
intents.csv
Each row contains a sample phrase, a comma, then the Library module that will be executed when that phrase is detected.
Sample intents.csv:
Hi,hello
Can you say hello to me?,hello
Library/
Sample 1 library/hello.js
moduleexports = solve: "Hi!" "Hello" "Wassup" ;
Sample 2 library/hello.js
moduleexports = { iftrue this; else this; };
Starters
Sample starters/howsitgoing.js
moduleexports = script0: "How's it going?" { ifthisprofilemood this; else this; } repeats: false starter: true flipper: false priority: 2 time: "Monday-Sunday 0800-1000"