-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quick Installation Guide #2
Comments
Hello cama, What could be the reasons this error after launching index.js, .env - ok, modules - ok Terminal = Debugger = |
I am running VS code on windows 10, node.js, git for windows and modules - latest versions express.listen(80) is creating a server normally btw What do I need to configure on the AWS system, except bucket name? |
Hello, @Danail-Irinkov . Yet BotStackJS depends on Redis. In the future we will make this dependency optional. So now you need to start Redis to solve this issue. |
Thank you very much, I am trying to use virtual box to start redis server in ubuntu :) |
Thanks Danail for giving Botstackjs a go. Let me know if you have any more challenges getting it working. I've created an issue to make REDIS optional and use MongoDb for Sessions. It will simplify deployment and meet most use cases. |
@Danail-Irinkov Would a demo repo that extends BotstackJS be useful? We could possible stand up a shared mongoDB\REdis instance so all you have to do is deploy the code to a Heroku instance, update a few env variables like API.AI and be up and running. Cam |
Hello Cam,
great to hear from you :)
I did already start a redis server on my machine, have a look at the
screenshot :)
ngrok is a free SSL tunneling service and works fine with app.listen()
But since I am completely new to this field, I struggle to find info on the
specifics of how I should connect all the modules of everything.
Can you please explain to me what all the modules are used for in
BotStackJS?
Why(What for) do you use?
AWS?
S3?
Redis?
API.ai?
Dashbot?
Bot-metrics(kinda obvious)
DynamoDB? (should be installed on the redis server? I am not quite sure
what do I need to do to set it up and running :))
I pretty much have read half the code to be able to start it to this stage
that the screenshot shows, so I have a decent Idea already, but It will be
very helpful to know definitely why do we need the services :)
Kind regards,
Dan
…On 23 February 2017 at 01:53, Cameron McGrane ***@***.***> wrote:
@Danail-Irinkov <https://github.com/Danail-Irinkov> Would a demo repo
that extends BotstackJS be useful?
#4 <#4>
We could possible stand up a shared mongoDB\REdis instance so all you have
to do is deploy the code to a Heroku instance, update a few env variables
like API.AI and be up and running.
Cam
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AYjPquVrsTfcjpnsN44CbgqiITahYezMks5rfMp_gaJpZM4MFyDi>
.
|
Is there an easy way to skip the Api-ai event processing and redirect it to
code in node.js?
So I can experiment with FB webview quicker? and then to turn it back to
api.ai?
…On 23 February 2017 at 13:02, Danail Irinkov ***@***.***> wrote:
Hello Cam,
great to hear from you :)
I did already start a redis server on my machine, have a look at the
screenshot :)
ngrok is a free SSL tunneling service and works fine with app.listen()
But since I am completely new to this field, I struggle to find info on
the specifics of how I should connect all the modules of everything.
Can you please explain to me what all the modules are used for in
BotStackJS?
Why(What for) do you use?
AWS?
S3?
Redis?
API.ai?
Dashbot?
Bot-metrics(kinda obvious)
DynamoDB? (should be installed on the redis server? I am not quite sure
what do I need to do to set it up and running :))
I pretty much have read half the code to be able to start it to this stage
that the screenshot shows, so I have a decent Idea already, but It will be
very helpful to know definitely why do we need the services :)
Kind regards,
Dan
On 23 February 2017 at 01:53, Cameron McGrane ***@***.***>
wrote:
> @Danail-Irinkov <https://github.com/Danail-Irinkov> Would a demo repo
> that extends BotstackJS be useful?
>
> #4 <#4>
>
> We could possible stand up a shared mongoDB\REdis instance so all you
> have to do is deploy the code to a Heroku instance, update a few env
> variables like API.AI and be up and running.
>
> Cam
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#2 (comment)>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AYjPquVrsTfcjpnsN44CbgqiITahYezMks5rfMp_gaJpZM4MFyDi>
> .
>
|
Hi @Danail-Irinkov . Yes, you can override class method |
Thank you :) I got to know the code a lot better now.
I managed to start running it and post some custom replies and buttons.
It will happen shortly :)
…On 27 February 2017 at 14:46, webus ***@***.***> wrote:
Hi @Danail-Irinkov <https://github.com/Danail-Irinkov> . Yes, you can
override class method textMessage or / and postbackMessage and add your
custom behaviour.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AYjPqmYHnaK0yaypL2DxPKq44N0sID47ks5rgsWmgaJpZM4MFyDi>
.
|
Hi Dan Here is the updated list of what's in and out why we to use and whether you need them: In S3 [optional] - scalable storage for media like images and video Out Dynamos - Removed. Using Mongodb Hope this helps. Cam |
Dear Cam,
thank you, yes it helps a lot.
It is a big mess when you first get into bots, because of all the competing
services you can use ==> I wasnt sure how exactly the BotStack is depending
on them.
However now I began to understand.
I faced two bugs though, I guess you know about one of them - the fallback
function and the other one is serving static files on localhost.
1. fallback(message, senderID) {
log.debug("Unknown message", {
module: "botstack:fallback",
senderId: senderID,
message: message
});
//fb.reply(fb.textMessage("Ops, internal short circuit... Shutting
down... :("), senderID);* ----why does it happen that when this line is
active it loops constantly?*
};
2. This is inside the Class BotStack:
this.server.get('/images/', (req, res, next) => {
//res.send(__dirname + '/images')
let serveData = {
directory: './images', *-------- I cannot understand where is
the root for this restify function and it just won't serve an html from a
subfolder. I tried for 2 hours different debugging things and couldn't find
it...*
file: 'images.html',
}
restify.serveStatic(serveData),
});
Kind regards,
Dan
…On 27 February 2017 at 23:10, Cameron McGrane ***@***.***> wrote:
Hi Dan
Here is the updated list of what's in and out why we to use and whether
you need them:
In
S3 [optional] - scalable storage for media like images and video
REDIS - scalable in memory cache for storing session state. It's in the
backlog to make this optional and by default use Mongodb for session state
API.AI - Natural Language Programming
DASHBOT [optional] - Third party analytics and broadcast platform
Botmetrics [optional] - Third party analytic platform. Less features than
Dashbot but has a useful bot for checking metrics.
Out
Dynamos - Removed. Using Mongodb
Hope this helps.
Cam
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AYjPqpGnDOgShSHXiK1_aX6I35-VK9afks5rgzvBgaJpZM4MFyDi>
.
|
This happens when Facebook sends messages that BotStackJS not yet able to handle correctly. Typically, this is a service message from facebook. In the future we will properly handle.
Under the hood BotStackJS uses Restify, perhaps you should read the documentation on restify.serveStatic Usually the root directory is the directory where you run node for execution. BotStackJS can serve static files for you. All you just need to set 2 environment variables: For example, you can set this value:
|
Thank you, for the help a lot :), I also thought it was a restify issue :)
A small bug report:
in session.js:
let clearOldSessions = co(function* () {
let not = new Date(); //possible bug with now=undefined, I guess it should
be 'now' here :)
let sessionsSize = yield client.hlenAsync("sessions");
let sessions = yield client.hgetallAsync("sessions");
for (senderId in sessions) {
let data = JSON.parse(sessions[senderId]);
if (Math.abs(now - data.lastUsed) > maxSessionAge_ms) {
client.hdelAsync("sessions", senderId);
}
}
let sessionsSizeNow = yield client.hlenAsync("sessions");
console.log('Session Size ' + sessionsSizeNow + ' items. Removed ' +
(sessionsSize - sessionsSizeNow) + ' items');
});
…On 1 March 2017 at 14:39, webus ***@***.***> wrote:
Hi @Danail-Irinkov <https://github.com/Danail-Irinkov>
1. fallback(message, senderID) {
log.debug("Unknown message", {
module: "botstack:fallback",
senderId: senderID,
message: message
});
//fb.reply(fb.textMessage("Ops, internal short circuit... Shutting
down... :("), senderID);* ----why does it happen that when this line is
active it loops constantly?*
};
This happens when Facebook sends messages that BotStackJS not yet able to
handle correctly. Typically, this is a service message from facebook. In
the future we will properly handle.
1. This is inside the Class BotStack:
this.server.get('/images/', (req, res, next) => {
//res.send(__dirname + '/images')
let serveData = {
directory: './images',
*-------- I cannot understand where is the root for this restify function
and it just won't serve an html from a subfolder. I tried for 2 hours
different debugging things and couldn't find it...*
file: 'images.html',
}
restify.serveStatic(serveData),
});
Under the hood BotStackJS uses Restify
<https://github.com/restify/node-restify>, perhaps you should read the
documentation on restify.serveStatic
<https://github.com/restify/node-restify/blob/c7aa7786a4cb6a2d8fe2862c46aca1f726ff8f7c/docs/pages/components/plugins.md#serve-static>
Usually the root directory is the directory where you run node for
execution.
BotStackJS can serve static files for you. All you just need to set 2
environment variables: BOTSTACK_STATIC and BOTSTACK_URL.
For example, you can set this value: BOTSTACK_STATIC=./media
And next create public path inside media (it's Restify issue). After this
you can get your files by this URL for example :
http://localhost:3000/public/myfile.png
BOTSTACK_URL reserved for future use. You can setup this variable with
empty value: BOTSTACK_URL=
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AYjPqri7HSmYl2P06ck97bQtC3df_1meks5rhWcFgaJpZM4MFyDi>
.
|
Quick and dirty installation guide on how to get started with Botstackjs.
https://github.com/cama/botstackjs/blob/master/README.md#installation
The text was updated successfully, but these errors were encountered: