1.0.102 • Published 5 years ago

bot-middleware-jubi v1.0.102

Weekly downloads
-
License
ISC
Repository
-
Last release
5 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

5 years ago

1.0.101

5 years ago

1.0.100

5 years ago

1.0.99

5 years ago

1.0.98

5 years ago

1.0.96

5 years ago

1.0.95

5 years ago

1.0.94

5 years ago

1.0.93

5 years ago

1.0.92

5 years ago

1.0.91

5 years ago

1.0.90

5 years ago

1.0.89

5 years ago

1.0.88

5 years ago

1.0.87

5 years ago

1.0.86

5 years ago

1.0.85

5 years ago

1.0.84

5 years ago

1.0.83

5 years ago

1.0.82

5 years ago

1.0.81

5 years ago

1.0.80

5 years ago

1.0.79

5 years ago

1.0.78

5 years ago

1.0.77

5 years ago

1.0.76

5 years ago

1.0.75

5 years ago

1.0.74

5 years ago

1.0.73

5 years ago

1.0.72

5 years ago

1.0.71

5 years ago

1.0.70

5 years ago

1.0.69

5 years ago

1.0.68

5 years ago

1.0.67

5 years ago

1.0.66

5 years ago

1.0.65

5 years ago

1.0.64

5 years ago

1.0.63

5 years ago

1.0.62

5 years ago

1.0.61

5 years ago

1.0.60

5 years ago

1.0.59

5 years ago

1.0.58

5 years ago

1.0.57

5 years ago

1.0.56

5 years ago

1.0.55

5 years ago

1.0.54

5 years ago

1.0.53

5 years ago

1.0.52

5 years ago

1.0.51

5 years ago

1.0.50

5 years ago

1.0.49

5 years ago

1.0.48

5 years ago

1.0.47

5 years ago

1.0.46

5 years ago

1.0.45

5 years ago

1.0.44

5 years ago

1.0.43

5 years ago

1.0.42

5 years ago

1.0.41

5 years ago

1.0.40

5 years ago

1.0.39

5 years ago

1.0.38

5 years ago

1.0.37

5 years ago

1.0.36

5 years ago

1.0.35

5 years ago

1.0.34

5 years ago

1.0.33

5 years ago

1.0.32

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.29

5 years ago

1.0.28

5 years ago

1.0.27

5 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago