Skip to content

Instantly share code, notes, and snippets.

@christiannwamba
Created December 21, 2017 14:18
Show Gist options
  • Save christiannwamba/52075fd3d36be2ec6cf5b24dfb964f92 to your computer and use it in GitHub Desktop.
Save christiannwamba/52075fd3d36be2ec6cf5b24dfb964f92 to your computer and use it in GitHub Desktop.
onSubmit() {
const payload = {name: this.name, content: this.content, channel: this.channelName};
axios.post('http://localhost:2000/comment', payload)
.then(response => {
console.log(response);
})
}
```
## Configure Server
On the server side, In addition to pusher there are other dependencies required to build our realtime feature, they are Body-Parser, CORS and Express Server. We install these with:
```bash
npm install --save body-parser pusher cors express
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment