Beginning KeystoneJS: A practical introduction to KeystoneJS using a real-world project by Manikanta Panati

Beginning KeystoneJS: A practical introduction to KeystoneJS using a real-world project by Manikanta Panati

Author:Manikanta Panati [Panati, Manikanta]
Language: eng
Format: azw3
Publisher: Apress
Published: 2016-12-16T05:00:00+00:00


6.2 Introducing KeystoneJS’s Default Middleware

Open your project’s /routes/middleware.js file and you’ll find three ready-made middleware solutions, including the following: initLocals : This middleware initializes standard view locals to include navlinks and the current user. View local is an object that contains response local variables scoped to the request and is therefore available to the view(s) rendered during that request / response cycle. This property is useful for exposing request-level information such as the request path name, authenticated user, user settings, and data.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.