Skip to content

Commit

Permalink
add code styling on readme
Browse files Browse the repository at this point in the history
  • Loading branch information
antonybudianto committed Jan 7, 2017
1 parent 30062d4 commit ab492b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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}`
Expand Down

0 comments on commit ab492b6

Please sign in to comment.