This application shows how to integrate Pusher with a Node.js/Express/MongoDB backend and React in the front-end.
You can follow the tutorial to build this application or jump straight to the code.
- Create an app on Pusher and copy your app's id, key, and secret.
- Clone this repository and
cd
into it. - Start the MongoDB server
- Execute
npm install
to download dependencies. - Execute
PUSHER_APP_ID=XXXXXX PUSHER_APP_KEY=XXXXXX PUSHER_APP_SECRET=XXXXXX node server.js
to set the environment variables needed by the app with your Pusher info and start it. - Go to
http://localhost:3000
and start sending playing with the app using Postman to communicate with the API or the Pusher console to test only the front-end part.
- A free Pusher account
- Node.js version 5 or greater
- A MongoDB database
- Pusher - APIs to enable devs building realtime features
- React - A JavaScript library for building user interfaces
- Node.js - A JavaScript runtime
- Express - Fast, unopinionated, minimalist web framework for Node.js
- MongoDB - A NoSQL database
- Thanks to Pusher for sponsoring this tutorial.