1.0.102 • Published 6 years ago

bot-middleware-jubi v1.0.102

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

Installation

npm install bot-middleware-jubi --save

Usage

Initializing a Server. You need to have Mongo Db endpoints. (Web by default)

 require("bot-middleware-jubi").Server({
    root:"https://yourdomain.com/path",
    socketLocalPath: '/socket',
    httpPort:4000,
    cluster:false,
    dbUri:'mongodb://root:root@127.0.0.1:27017/pigaro',
    staticDirectory:__dirname+"/static",
    adapterPath:"/adapter",
    adapterDirectory:__dirname+"/adapter",
    projectId:"myproject_100911645983",
    dashbotKey:"VxtYPVW6168LIiXwqpIku9wE",
    directMultiplier:1,
    fallbackMultiplier:0.8,
    passphraseMiddleware:"YGUYGgyjgblgUGIYGIGkwhbiuashbo98u9283hr9h24rqIYGI932kbidbiadsYE",
    timeoutSeconds:60,
    fcmServerKey:"AAAAYTZC9WQ:APA91bFRmKa",
    firebaseWebConfig:{
        apiKey: "sd-ZrO9xKQ",
        authDomain: "on-f31.firebaseapp.com",
        databaseURL: "https://on-f31.firebaseio.com",
        projectId: "on-f31",
        storageBucket: "",
        messagingSenderId: "4175221234234"
    }
},()=>{
    //TO DO AFTER INITIALIZATION
})

Initializing the Cluster. You need to have Redis and Mongo Db endpoints.

 require("bot-middleware-jubi").Server({
    root:"https://yourdomain.com/path",
    socketLocalPath: '/socket',
    httpPort:4000,
    cluster:true,
    redis:{
        host:'127.0.0.1',
        port:6379
    },
    dbUri:'mongodb://root:root@127.0.0.1:27017/pigaro',
    staticDirectory:__dirname+"/static",
    adapterPath:"/adapter",
    adapterDirectory:__dirname+"/adapter",
    projectId:"myproject_100911645983",
    dashbotKey:"VxtYPVW6168LIiXwqpIku9wE",
    directMultiplier:1,
    fallbackMultiplier:0.8,
    passphraseMiddleware:"YGUYGgyjgblgUGIYGIGkwhbiuashbo98u9283hr9h24rqIYGI932kbidbiadsYE",
    timeoutSeconds:60,
    fcmServerKey:"AAAAYTZC9WQ:APA91bFRmKa",
    firebaseWebConfig:{
        apiKey: "sd-ZrO9xKQ",
        authDomain: "on-f31.firebaseapp.com",
        databaseURL: "https://on-f31.firebaseio.com",
        projectId: "on-f31",
        storageBucket: "",
        messagingSenderId: "4175221234234"
    }
 },()=>{
    //TO DO AFTER INITIALIZATION
})

For Facebook initialization

 //TO DO AFTER INITIALIZATION
 require("bot-middleware-jubi").facebook({
     verificationToken:"verify",
     pageAccessToken:"EAAC0860ccOEBAP3189NahL5IUkeqo7",
     path:"/fb"
 })

For Twilio Whatsapp initialization

 //TO DO AFTER INITIALIZATION
 require("bot-middleware-jubi").whatsapp({
     accountSid: "AC42dssdsdsdb3e80023",
     authToken: "4295006bsd98c6d6a",
     path: "/whatsapp",
     number:"whatsapp:+919999999999"
 })

For Firebase Mobile initialization

 //TO DO AFTER INITIALIZATION
 require("bot-middleware-jubi").mobile({
     fcmKey: "sdsad23423423dw",
     path: "/mobile"
 })

Creating adapter folders for apis

 require("bot-middleware-jubi").createAdapter("intent",{
     operationFileNames:{
         validate:"post",
         decorate:"pre"
     },
     adapterDirectory:__dirname+"/adapter"
 })

Creating frontend folders for static files

 require("bot-middleware-jubi").createFrontend({
    root:"https://yourdomain.com/path",
    staticDirectory:__dirname+"/static",
    projectId:"myproject_100911645983",
    passphraseMiddleware:"YGUYGgyjgblgUGIYGIGkwhbiuashbo98u9283hr9h24rqIYGI932kbidbiadsYE",
    firebaseWebConfig:{
        apiKey: "AIzaSyAAqVdFN_8wbXK4W_YLZj2q6rF-ZrO9xKQ",
        authDomain: "push-notification-f31b9.firebaseapp.com",
        databaseURL: "https://push-notification-f31b9.firebaseio.com",
        projectId: "push-notification-f31b9",
        storageBucket: "",
        messagingSenderId: "417522185572"
    },
    iconPath:"/icon.png"
 })

Creating VAPID Public and Private Keys

const vapidKeys=require("bot-middleware-jubi").createVAPIDKeys()
1.0.102

6 years ago

1.0.101

6 years ago

1.0.100

6 years ago

1.0.99

6 years ago

1.0.98

6 years ago

1.0.96

6 years ago

1.0.95

6 years ago

1.0.94

6 years ago

1.0.93

6 years ago

1.0.92

6 years ago

1.0.91

6 years ago

1.0.90

6 years ago

1.0.89

6 years ago

1.0.88

6 years ago

1.0.87

6 years ago

1.0.86

6 years ago

1.0.85

6 years ago

1.0.84

6 years ago

1.0.83

6 years ago

1.0.82

6 years ago

1.0.81

6 years ago

1.0.80

6 years ago

1.0.79

6 years ago

1.0.78

6 years ago

1.0.77

6 years ago

1.0.76

6 years ago

1.0.75

6 years ago

1.0.74

6 years ago

1.0.73

6 years ago

1.0.72

6 years ago

1.0.71

6 years ago

1.0.70

6 years ago

1.0.69

6 years ago

1.0.68

6 years ago

1.0.67

6 years ago

1.0.66

6 years ago

1.0.65

6 years ago

1.0.64

6 years ago

1.0.63

6 years ago

1.0.62

6 years ago

1.0.61

6 years ago

1.0.60

6 years ago

1.0.59

6 years ago

1.0.58

6 years ago

1.0.57

6 years ago

1.0.56

6 years ago

1.0.55

6 years ago

1.0.54

6 years ago

1.0.53

6 years ago

1.0.52

6 years ago

1.0.51

6 years ago

1.0.50

6 years ago

1.0.49

6 years ago

1.0.48

6 years ago

1.0.47

6 years ago

1.0.46

6 years ago

1.0.45

6 years ago

1.0.44

6 years ago

1.0.43

6 years ago

1.0.42

6 years ago

1.0.41

6 years ago

1.0.40

6 years ago

1.0.39

6 years ago

1.0.38

6 years ago

1.0.37

6 years ago

1.0.36

6 years ago

1.0.35

6 years ago

1.0.34

6 years ago

1.0.33

6 years ago

1.0.32

6 years ago

1.0.31

6 years ago

1.0.30

6 years ago

1.0.29

6 years ago

1.0.28

6 years ago

1.0.27

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago