This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import { ChatManager, TokenProvider } from '@pusher/chatkit' | |
class MessageList extends Component { | |
render = () => ( | |
<ul> | |
{this.props.messages.map(message => ( | |
<li key={message.id}>{message.text}</li> | |
))} | |
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const bodyParser = require('body-parser') | |
const cors = require('cors') | |
const Chatkit = require('@pusher/chatkit-server') | |
const app = express() | |
const chatkit = new Chatkit.default({ | |
instanceLocator: 'YOUR INSTANCE LOCATOR', | |
key: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin('~/.local/share/nvim/plugged') | |
Plug 'NLKNguyen/papercolor-theme' | |
Plug 'pangloss/vim-javascript' | |
Plug 'christoomey/vim-tmux-navigator' | |
Plug 'tpope/vim-unimpaired' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-commentary' | |
Plug 'tpope/vim-eunuch' | |
Plug 'tpope/vim-vinegar' | |
Plug 'tpope/vim-vinegar' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
return ( | |
<div | |
style={{ | |
display: 'flex', | |
height: '100vh', | |
}} | |
> | |
<div | |
style={{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const bodyParser = require('body-parser') | |
const cors = require('cors') | |
+const Chatkit = require('pusher-chatkit-server') | |
const app = express() | |
+const chatkit = new Chatkit.default({ | |
+ instanceLocator: 'YOUR INSTANCE LOCATOR', | |
+ key: 'YOUR KEY', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const server = require('server') | |
const fetch = require('node-fetch') | |
const Chatkit = require('pusher-chatkit-server') | |
const { get, post } = server.router | |
const { json, header } = server.reply | |
const cors = [ | |
ctx => header('Access-Control-Allow-Origin', '*'), | |
ctx => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
textSyncInstance.createEditor({ | |
docId: "1", | |
element: "#editor", | |
defaultText: 'Compose an epic...' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Pusher = require('pusher') | |
const uuid = require('uuid/v1') | |
const ngrok = require('ngrok') | |
var pusher = new Pusher({ | |
appId: '385685', | |
key: '955f28f383404945239b', | |
secret: 'c58baaf698167224517f', | |
cluster: 'eu', | |
encrypted: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const textSync = new TextSync({ | |
instance: instance, | |
host: host, | |
user: { | |
name: name, | |
email: email | |
} | |
}); | |
const textSyncEditor = textSync.createEditor({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<h2>Comments</h2> | |
<div id="container"> | |
<div id="comments"> |