Loopback 4 example using express server to expose customised APIs
- Support LDAP(S) authentication
- Support Basic authentication
- Support basic security features using helmet
- Support basic rate limiting
- Support winston logger and rsyslog
- Support integration with db2
- Support encryption of .env
- Install nodejs
- Run: 'npm install'
- Create .env file (refer to sample.env.txt)
- Encode .env using: 'npx secure-env .env -s YourSecretKey'
- Set environment variable
- SK=YourSecretKey
- AUTH=ldap|basic (default: ldap)
- HOST=0.0.0.0 (default: 0.0.0.0)
- PORT=3000 (default: 3000)
- To start, run: 'npm start'
To use the below commands, run 'npm install -g @loopback/cli'
- Setup database connectivity: lb4 datasource
- Discover models: lb4 discover
- Setup models' repository: lb4 repository
- Setup models' relation: lb4 relation
- Setup sevices: lb4 service
- Install docker-openlap from https://github.com/osixia/docker-openldap
- Run: docker run -p 636:636 --name my-openldap-container --detach osixia/openldap
- Run: docker run -it -v d:/data:/data osixia/openldap /bin/bash
- Get all generated certs from /container/service/slapd/assets/certs
- Update the certs path in .env and encrypt it
- Set environment variable to disable certificate verfication
- NODE_TLS_REJECT_UNAUTHORIZED=0