From ab492b6ec9ad343cf52b257732cab32f5e3fba20 Mon Sep 17 00:00:00 2001 From: Antony Budianto Date: Sat, 7 Jan 2017 12:13:50 +0700 Subject: [PATCH] add code styling on readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dc82117..3ec753e 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,14 @@ Express middleware for your Firebase applications. ## How to use 1. Install the packages using npm - ``` + ```sh npm install express firebase-admin express-firebase-middleware ``` Both `express` and `firebase-admin` are peerDependencies. 2. Require it in your express routes - ``` + ```js var firebaseMiddleware = require('express-firebase-middleware'); router.use('/api', firebaseMiddleware.auth); @@ -25,7 +25,7 @@ Express middleware for your Firebase applications. The client can get the token from their client SDK (Web, Android, iOS Firebase SDK) 4. When requesting, and token is valid, you can get the `user` object from response - ``` + ```js router.get('/api/hello', (req, res) => { res.json({ message: `You're logged in as ${res.locals.user.email} with Firebase UID: ${res.locals.user.uid}`