A tutorial to showcase realtime functionality of Pusher Channels in Ember
A basic knowledge of JavaScript.
You will also need the following things properly installed on your computer.
git clone https://github.com/9jaswag/pusher-geofencing.git
this repositorycd pusher-geofencing
npm install
- Create a
.env
file in thenode-server
directory and add the following to it:
PUSHER_APP_ID: 'your Pusher app ID'
PUSHER_APP_KEY: 'your Pusher app key'
PUSHER_APP_SECRET: 'your Pusher app secret'
PUSHER_APP_CLUSTER: 'your Pusher app cluster'
Replace the constants above with your Pusher credentials.
- Open the
index.html
file and add your Google Maps API key
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=geometry"></script>
- Add your Pusher credentials in
app/components/display-maps.js
let pusher = new Pusher('YOUR_APP_KEY', {
cluster: 'CLUSTER',
encrypted: true
});
ember serve
- Visit your app at http://localhost:4200.