https://github.com/mappmechanic/flash-comments
Flash Comments - Realtime Live Commenting using Pusher & Websockets
https://github.com/mappmechanic/flash-comments
html javascript pusher vanilla-javascript websockets
Last synced: about 1 year ago
JSON representation
Flash Comments - Realtime Live Commenting using Pusher & Websockets
- Host: GitHub
- URL: https://github.com/mappmechanic/flash-comments
- Owner: mappmechanic
- License: mit
- Created: 2017-02-20T20:21:42.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-07-05T05:45:20.000Z (about 8 years ago)
- Last Synced: 2025-06-04T03:50:38.354Z (about 1 year ago)
- Topics: html, javascript, pusher, vanilla-javascript, websockets
- Language: CSS
- Size: 584 KB
- Stars: 17
- Watchers: 3
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flash-comments
Flash Comments - Realtime Live Commenting using Pusher & Websockets
[View tutorial](https://pusher.com/tutorials/live-comments-javascript)
## Prerequisite Softwares
- NodeJS
- NPM
- Yarn (Optional)
## Running the Project
In order to run the app on your machines, please follow the below given steps:
1. Clone the Repo using the URL - https://github.com/mappmechanic/flash-comments
```
git clone https://github.com/mappmechanic/flash-comments.git
```
2. Run either of the following commands to install dependencies
```
npm install
```
OR
```
yarn
```
3. Signup at [https://pusher.com/signup](https://pusher.com/signup).
4. Create a new app to obtain the API Key, secret & appId. Also, I have chosen the cluster **'ap2 (Mumbai, India)**, but you will be required to choose a cluster specific to your app users.
Replace the respective key, secret & appId for pusher initialisation in **server.js** file with your values:
```javascript
var pusher = new Pusher({
appId: '',
key: '',
secret: '',
cluster: 'ap2',
encrypted: true
});
```
5. Finally you will have to also replace your app-key in **app.js** file too:
```javascript
...
pusher = new Pusher('', {
cluster: 'ap2',
encrypted: true
}),
...
```
6. Now we are ready to run our app using the following node commands
```
node server
```
7. We will be able to access the app at [http://localhost:9000](http://localhost:9000)
For Any clarifications or questions Tweet to me at
[https://twitter.com/mappmechanic](https://twitter.com/mappmechanic)