- Create an angular lib for microservice with command below
ng generate library my-service
- Add path for created lib to
tsconfig.json
"paths": {
// other paths
"my-service": ["projects/my-service/src/public-api.ts"]
}
- Add api info to
environment.ts
file
MyService: {
url: 'https://localhost:$PORT'
rootNamespace: '$ROOT_NAMESPACE',
},
- Run proxy generation command
abp generate-proxy -t ng -m myService -u https://service-url --target my-service
- Export generated code in
packages/my-service/src/public-api.ts
export * from './lib/proxy';
or
export * from './lib/proxy/my-service/index'';