Skip to content

Moved lb3 to examples and added lb4-express - #15

Merged
marcelobern merged 6 commits into
botbits:masterfrom
marcelobern:master
Jun 17, 2020
Merged

marcelobern merged 6 commits into
botbits:masterfrom
marcelobern:master

Conversation

@marcelobern

Copy link
Copy Markdown
Contributor

Changes

  • Moved previous (loopback3) example to examples folder. This example continues using RDS.
  • Added loopback 4 (via express) to the example folder. For simplicity, this example uses the loopback 4 in memory datasource instead of RDS.

Known issues

  • Loopback 3 example deploys to AWS but has stopped working (see error below). Not spending time to fix it as loopback 3 is under LTS maintenance. Keeping the example here mostly as a reference and can work on troubleshooting if the needs arises.
Error
404 There is no method to handle GET /explorer/

Error: There is no method to handle GET /explorer/
    at restUrlNotFound (/var/task/node_modules/strong-remoting/lib/rest-adapter.js:425:17)
    at Layer.handle [as handle_request] (/var/task/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/task/node_modules/express/lib/router/index.js:317:13)
    at /var/task/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/var/task/node_modules/express/lib/router/index.js:335:12)
    at next (/var/task/node_modules/express/lib/router/index.js:275:10)
    at jsonParser (/var/task/node_modules/body-parser/lib/types/json.js:119:7)
    at Layer.handle [as handle_request] (/var/task/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/task/node_modules/express/lib/router/index.js:317:13)
    at /var/task/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/var/task/node_modules/express/lib/router/index.js:335:12)
    at next (/var/task/node_modules/express/lib/router/index.js:275:10)
    at urlencodedParser (/var/task/node_modules/body-parser/lib/types/urlencoded.js:100:7)
    at Layer.handle [as handle_request] (/var/task/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/task/node_modules/express/lib/router/index.js:317:13)
    at /var/task/node_modules/express/lib/router/index.js:284:7
  • Loopback 4 example deploys to AWS and loads API explorer but CloudFront is rejecting the API calls from API explorer front end but all works from Postman. Based on some quick research, I suspect the issue is related to CloudFront behavior around headers and would need to change the CloudFront instance used (not possible since it is not accessible) or look into the loopback 4 headers. Ignoring this issue as API invocation is working from Postman.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant