graphql-engine/community/boilerplates/auth-webhooks/nodejs-firebase/server.js
Tirumarai Selvan 756614c326
update auth-webhook boilerplates for node (#4885)
1) split nodejs-express boilerplate into nodejs-express and nodejs-firebase
2) update deploy instructions for heroku
2020-05-26 14:43:58 +05:30

21 lines
537 B
JavaScript

// Sample webhook showing what a hasura auth webhook looks like
// init project
var express = require('express');
var app = express();
var requestClient = require('request');
var port = process.env.PORT || 3000;
app.get('/', (req, res) => {
res.send('Webhooks are running');
});
// Firebase handler
var firebaseRouter = require('./firebase/firebaseHandler');
app.use('/firebase', firebaseRouter);
// listen for requests :)
var listener = app.listen(port, function () {
console.log('Your app is listening on port ' + port);
});