Created
September 1, 2017 19:35
-
-
Save SpeedoPasanen/e162adff4191cae3c897e6bc5b7fd605 to your computer and use it in GitHub Desktop.
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
// ... pass this to Express or firebase functions.https.onRequest: | |
function universal(req, res) { | |
renderModuleFactory(AppServerModuleNgFactory, { | |
document: index, | |
url: req.path || '/', | |
extraProviders: [ | |
{ provide: 'firebaseAdmin', useValue: admin } | |
] | |
}) | |
.then(function (html) { | |
res.send(html); | |
}).catch(function (e) { | |
console.log(e) | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment