Topic on Talk:Service-template-node/GettingStarted

Bundle required default routes in a dependency

2
Jdlrobson (talkcontribs)

The service template node includes various routes and tests for them including info.js

This is a little confusing as it mixes examples with dependencies.

It seems more intuitive for these routes to live in their own repo and be installed via `npm install` rather than bundled in the repo.

When cloning the repo I removed these as I thought they were examples. Having these as dependencies would make the repo easier to grok and prevent making mistakes like this: https://gerrit.wikimedia.org/r/#/c/318507/3/test/features/info/info.js,unified

Jdlrobson (talkcontribs)

I should also add that I removed this as the tests were not passing and it was not clear how to fix them from the README. Given I thought it was just an example route I took the easy option of removing it.

1) service information should redirect to the service home page:

HTTPError: 404

at Request.P.try.bind.then.err.retry.HTTPError.status (node_modules/preq/index.js:232:23)

at Request.tryCatcher (node_modules/bluebird/js/release/util.js:16:23)

at Promise._settlePromiseFromHandler (node_modules/bluebird/js/release/promise.js:510:31)

at Promise._settlePromise (node_modules/bluebird/js/release/promise.js:567:18)

at Promise._settlePromise0 (node_modules/bluebird/js/release/promise.js:612:10)

at Promise._settlePromises (node_modules/bluebird/js/release/promise.js:691:18)

at Promise._fulfill (node_modules/bluebird/js/release/promise.js:636:18)

at Request._callback (node_modules/bluebird/js/release/nodeback.js:45:21)

at Request.self.callback (node_modules/request/request.js:186:22)

at Request.<anonymous> (node_modules/request/request.js:1081:10)

at IncomingMessage.<anonymous> (node_modules/request/request.js:1001:12)

at endReadableNT (_stream_readable.js:926:12)

at _combinedTickCallback (internal/process/next_tick.js:74:11)

at process._tickCallback (internal/process/next_tick.js:98:9)

2) service information should get the service info:

AssertionError: No home field returned!

Reply to "Bundle required default routes in a dependency"