Skip to content

Instantly share code, notes, and snippets.

Ayooluwa ayoisaiah

Block or report user

Report or block ayoisaiah

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View App.js
import React, { useState, useEffect } from 'react';
import {
Chat,
Channel,
Thread,
Window,
ChannelList,
ChannelListTeam,
MessageList,
MessageTeam,
View server.js
require('dotenv').config();
const express = require('express');
const cors = require('cors');
const bodyParser = require('body-parser');
const { StreamChat } = require('stream-chat');
const AWS = require('aws-sdk');
const app = express();
app.use(cors());
View .env
PORT=5500
STREAM_API_KEY=
STREAM_APP_SECRET=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
View server.js
require('dotenv').config();
const express = require('express');
const cors = require('cors');
const bodyParser = require('body-parser');
const { StreamChat } = require('stream-chat');
const processMessage = require('./process-message');
const app = express();
View process-message.js
const projectId = '<your dialogflow project id>';
const sessionId = '123456';
const languageCode = 'en-US';
const dialogflow = require('dialogflow');
const config = {
credentials: {
private_key: process.env.DIALOGFLOW_PRIVATE_KEY,
client_email: process.env.DIALOGFLOW_CLIENT_EMAIL,
View App.js
import React, { useState, useEffect } from 'react';
import './App.css';
import {
Chat,
Channel,
ChannelHeader,
Window,
MessageList,
MessageCommerce,
MessageInput,
View server.js
require('dotenv').config();
const express = require('express');
const cors = require('cors');
const bodyParser = require('body-parser');
const { StreamChat } = require('stream-chat');
const app = express();
app.use(cors());
View .env
PORT=5500
STREAM_API_KEY=<your stream app key>
STREAM_APP_SECRET=<your stream app secret>
DIALOGFLOW_PRIVATE_KEY="<your dialogflow private key>"
DIALOGFLOW_CLIENT_EMAIL=<your dialogflow client email>
View main.go
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"time"
View .env
PORT=4000
STREAM_API_KEY=<YOUR_STREAM_API_KEY>
STREAM_API_SECRET=<YOUR_STREAM_API_SECRET>
You can’t perform that action at this time.