Skip to content

Instantly share code, notes, and snippets.

@brianjolly
Created July 25, 2018 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianjolly/6ea54e6e43155f1ab0a04dace35ad69a to your computer and use it in GitHub Desktop.
Save brianjolly/6ea54e6e43155f1ab0a04dace35ad69a to your computer and use it in GitHub Desktop.
app.prepare()
.then(() => {
const server = express()
global['Stack'] = Contentstack.Stack({
api_key: config.contentstack.api_key,
access_token: config.contentstack.access_token,
environment: config.contentstack.environment
});
server.get('*', (req, res) => {
apm.setTransactionName(req.originalUrl)
return handle(req, res)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment