-
-
Save christiannwamba/52075fd3d36be2ec6cf5b24dfb964f92 to your computer and use it in GitHub Desktop.
This file contains 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
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