This repository contains a JSON express server, which is both the backend AND the frontend for an Eliza chatbot app.
Point Jasonette to the root url for this server and it will return a JSON response, which Jasonette will interpret to self-construct into a native app.
How it works
The core logic is just a typical NLP technique I took from another open source module called
The only part you need to look at is the
- It starts an express server
- A Jasonette client makes a GET request to
- The server responds by sending back the JSON markup, and the Jasonette client renders accordingly.
- The markup contains a footer input.
- When a user presses the
sendbutton, it triggers the
sayaction, which makes a POST request to
- The server responds to the
POST /messagesrequest by saving it into local variable and returning the result. (This doesn't use any persistent DB, so the variable only stays on memory and will get reset when the server becomes idle)
- Set up a server using this code.
- Download Jasonette.
- Take the root url of your server and play it on Jasonette. Learn how.
Here's the license for the core Eliza logic.