Last active
August 8, 2017 06:57
-
-
Save lgvalle/171af29ac7c8601e8a6adc52a00b9197 to your computer and use it in GitHub Desktop.
Post: Take control of your backend (II)
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
const Client = require('node - rest - client').Client | |
const client = new Client() | |
exports.fetch = functions.https.onRequest((req, res) => { | |
client.get(BACKEND_URL, function (data, response) { | |
(…) // TODO Clean up | |
return res.status(200) | |
.type('application / json') | |
.send(data) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment