Skip to content

Instantly share code, notes, and snippets.

Last active May 13, 2019 09:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Firebase function serving restify server if production(else just start server onj)
const server = require(`./src/server`);
process.env.NODE_ENV === "DEV" ?
* If dev environment, run express server for local debugging.
server.listen(process.env.PORT || 3000) :
* Creates a function instance and with a specific specs.
* Serve to FireBase Express server obj.
exports[require("./package").name] = require("firebase-functions")
.runWith({ timeoutSeconds: 300, memory: "2GB" }).https.onRequest(server);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment