Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 810897e6 authored by a's avatar a
Browse files

removed unsued dockerfile and change documentation title

parent 57cc2e6e
No related branches found
No related tags found
No related merge requests found
FROM node:17.0.0
SHELL ["/bin/bash", "-c"]
COPY package.json package.json
COPY documentation /documentation
COPY src /src
ARG DOCUMENTATION_WEBHOOK_MANAGER_VOLUME
ENV DOCUMENTATION_WEBHOOK_MANAGER_VOLUME $DOCUMENTATION_WEBHOOK_MANAGER_VOLUME
RUN source /root/.bashrc && npm install
\ No newline at end of file
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 1024;
}
http {
server {
#add_header Content-Security-Policy "default-src 'self';";
charset utf-8;
source_charset utf-8;
location / {
include /etc/nginx/mime.types;
root /usr/share/nginx/react;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
listen 5004;
server_name localhost 127.0.0.1;
location /express/ {
resolver 127.0.0.11 valid=30s;
set $express_up express:3000;
proxy_pass http://express:3000/;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /messenger {
resolver 127.0.0.11 valid=30s;
set $messenger_up messenger:5000;
proxy_pass http://$messenger_up/webhook?$args;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /twitter {
resolver 127.0.0.11 valid=30s;
set $twitter_up twitter:5001;
proxy_pass http://$twitter_up/webhook?$args;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /slack {
resolver 127.0.0.11 valid=30s;
set $slack_up slack:5002;
proxy_pass http://$slack_up/webhook?$args;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /sbutton {
resolver 127.0.0.11 valid=30s;
set $sbutton_up slack:5002;
proxy_pass http://$sbutton_up/button;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
}
stream {
server {
listen 27017;
proxy_connect_timeout 1s;
proxy_timeout 3s;
proxy_pass stream_mongo_backend;
}
upstream stream_mongo_backend {
server mongoDB:27017;
}
}
......@@ -727,7 +727,7 @@ exports.publish = function(taffyData, opts, tutorials) {
files = find({kind: 'file'})
packages = find({kind: 'package'})
generate('Socialbus Documentation', '',
generate('Socialbus Webhook-Manager Documentation', '',
packages.concat(
[{
kind: 'mainpage',
......@@ -815,7 +815,7 @@ exports.publish = function(taffyData, opts, tutorials) {
const content = fs.readFileSync(conf.betterDocs.landing, 'utf8')
var landingPageData = {
title: 'Socialbus Documentation',
title: 'Socialbus Webhook-Manager Documentation',
content,
}
......
welcome to socialbus
\ No newline at end of file
{
"gettingStarted":
{
"title": "Getting Started Socialbus"
},
"functionnalDocumentation":
{
"title": "Functionnal Documentation Socialbus"
......
---
tags: mimove, socialbus, webhook-manager, website
---
# Socialbus use case
Ben is in a discussion group with his friends David and Josh, which like using Messenger. He is also in a reading club with David, but with also Gamran and Natalie which prefer using Twitter. Finally, he is a member of a Slack group for work.
......
......@@ -69,66 +69,5 @@ describe("test messenger webhook", function () {
done();
});
});
/*
* let body = req.body;
if (body.object === 'page')
{
body.entry.forEach(function(entry)
{
let body = entry.messaging[0];
console.log("body is :" + JSON.stringify(body));
let sender_psid = body.sender.id;
console.log("Sender PSID: ", sender_psid);
let isUser;
let response;
if(body.optin !== undefined)
{
response = {
userID : body.sender.id,
databaseUserID: body.optin.ref,
origin: "Website",
media:"Messenger"
};
postHandler.postToPlatform(response);
return;
}
response = {
connectors: {
sender:
{
id: body.sender.id
},
recipient:
{
id: body.recipient.id
},
id: body.sender.id
},
origin: "Messenger",
};
console.log("messenger bot ID:", process.env.MESSENGER_BOT_ID);
sender_psid !== process.env.MESSENGER_BOT_ID?
isUser = true:
isUser = false;
console.log("this is a user: " + isUser);
if(body.message && isUser)
{
response.text = body.message.text;
messageHandler.sendMessage(response, isUser);
}
else if (body.postback && isUser)
{
response.buttonID = body.postback.payload;
messageHandler.handleButtonDatabase(response);
}
});
res.status(200).send('RECEIVED EVENT');
* */
})
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment