|
|
|
|
|
## Creating SDK Loopback to Angular
|
|
|
|
|
|
|
|
|
There is one module that create an collection of API in typescript (used on Angular 5 or 6) from a Loopback server.
|
|
|
|
|
|
|
|
|
This module is named [LoopBack SDK Builder](https://github.com/mean-expert-official/loopback-sdk-builder).
|
|
|
To use this module on our project, you will need to up containers like
|
|
|
```bash
|
|
|
$ docker-compose up
|
|
|
```
|
|
|
|
|
|
After, you will need to enter on container.
|
|
|
```bash
|
|
|
$ docker ps
|
|
|
## Get the Loopback ensalamento-back container id
|
|
|
$ docker exec -it <container id> bash
|
|
|
```
|
|
|
|
|
|
Now, generate the SDK files with the follow commands:
|
|
|
```bash
|
|
|
$ mkdir client/sdk
|
|
|
$ ./node_modules/.bin/lb-sdk server/server.js client/sdk
|
|
|
```
|
|
|
|
|
|
The command will show many logs of the generated files on `client/sdk` directory.
|
|
|
|
|
|
You can use this `sdk` directory on your Angular Project as we describe on . |
|
|
\ No newline at end of file |