diff --git a/docker/Dockerfile.Documentation b/docker/Dockerfile.Documentation deleted file mode 100644 index c4bcea9900f385b9ac79a954f808238dfd9d6ca7..0000000000000000000000000000000000000000 --- a/docker/Dockerfile.Documentation +++ /dev/null @@ -1,12 +0,0 @@ -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 diff --git a/docker/nginx/nginxbackup.conf b/docker/nginx/nginxbackup.conf deleted file mode 100755 index d33cdab7a1a0ef784aa0de24274f7419c2afaea8..0000000000000000000000000000000000000000 --- a/docker/nginx/nginxbackup.conf +++ /dev/null @@ -1,77 +0,0 @@ -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; - } -} diff --git a/documentation/template/publish.js b/documentation/template/publish.js index 58ba8a41ebb9828a61c4ce4b1585701de65a849f..d4d7dcfc820bf1abb00ff01722b3019fee0dd1e7 100644 --- a/documentation/template/publish.js +++ b/documentation/template/publish.js @@ -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, } diff --git a/documentation/tutorials/gettingStarted.md b/documentation/tutorials/gettingStarted.md deleted file mode 100644 index ada263419e8017baf787b023554951b4700353cf..0000000000000000000000000000000000000000 --- a/documentation/tutorials/gettingStarted.md +++ /dev/null @@ -1 +0,0 @@ -welcome to socialbus \ No newline at end of file diff --git a/documentation/tutorials/tutorials.json b/documentation/tutorials/tutorials.json index d799e92f31a5c0fbe6fb1c3031fbf4e42e8ed5f7..c05353a02d33d15cec549cd34f73526e1fa67828 100644 --- a/documentation/tutorials/tutorials.json +++ b/documentation/tutorials/tutorials.json @@ -1,8 +1,4 @@ { - "gettingStarted": - { - "title": "Getting Started Socialbus" - }, "functionnalDocumentation": { "title": "Functionnal Documentation Socialbus" diff --git a/documentation/tutorials/useCase.md b/documentation/tutorials/useCase.md index 7f0d1671a052bf0875a364683b9b219f519157a6..aa86716fd98f06d032f89abed2046835f5d6da5d 100644 --- a/documentation/tutorials/useCase.md +++ b/documentation/tutorials/useCase.md @@ -1,7 +1,3 @@ ---- -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. diff --git a/test/messenger.test.js b/test/messenger.test.js index 184bbe98cbcb89bf7666c74b469378093b70d389..0f228cedca5a90d8a5baf5a41ba3ef9d005257bb 100644 --- a/test/messenger.test.js +++ b/test/messenger.test.js @@ -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