Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
React Native Stream Group Chat Tutorial: Initialize Stream Chat Server
// server/server.js
const express = require("express");
const bodyParser = require("body-parser");
const cors = require("cors");
const StreamChat = require('stream-chat').StreamChat;
require("dotenv").config();
const app = express();
const server_side_client = new StreamChat(
process.env.APP_KEY,
process.env.APP_SECRET
);
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
app.use(cors());
app.get("/", async (req, res) => {
res.send('all green!');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.