mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-08 08:44:24 +03:00
756614c326
1) split nodejs-express boilerplate into nodejs-express and nodejs-firebase 2) update deploy instructions for heroku
21 lines
537 B
JavaScript
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);
|
|
});
|