File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Heimdall
22
3- ## Instalation
3+ ## Installation
44
55 npm install @indec/heimdall
66
@@ -15,7 +15,7 @@ AUTH_CLIENT_SECRET=<your app secret>
1515GRANT_TYPE=client_credentials
1616```
1717
18- ## Example
18+ ## Examples
1919
2020### Login on client side
2121
@@ -24,7 +24,7 @@ import {LoginService} from '@indec/heimdall/client';
2424
2525// ENDPOINT constant is your heimdall server. i.e: http://localhost:5000
2626const loginService = new LoginService (ENDPOINT );
27- const token = await loginService .login (username, password)
27+ const token = await loginService .login (username, password);
2828```
2929
3030### Clean user session
@@ -41,9 +41,11 @@ List your app's users on server side:
4141
4242``` js
4343const {UserService } = require (' @indec/heimdall' ).services ;
44- UserService .fetchAll .then (
45- users => console .log (users)
46- ).catch (
47- err => console .error (err)
48- )
44+
45+ try {
46+ const users = await UserService .fetchAll ();
47+ console .log (users);
48+ } catch (err) {
49+ console .error (err);
50+ }
4951```
You can’t perform that action at this time.
0 commit comments