Repository navigation
Modularly load the rest api and the explorer - #230
hacksparrow wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Please don't change the version as our release tool will do it automatically.
There was a problem hiding this comment.
That's great! Thanks for letting me know.
There was a problem hiding this comment.
I think these two lines should use loopback-component-explorer?
|
Hi @hacksparrow, thank you for the pull request! I found few issues (see above), could you please address them? |
|
@bajtos thanks a lot. I will be making the changes you suggested. |
e151c10 to
a864697
Compare
|
@bajtos I just made the changes. Please take a look. |
|
👍 i have waited for this, thanks ... |
There was a problem hiding this comment.
i think you missed some configuration for this middleware, and you also can remove the code in the server.js
see the example app: https://github.com/strongloop/loopback-example-app/pull/77/files#diff-264492e8c99bdecaf2b533ecdb34a2ebR27
There was a problem hiding this comment.
Those middleware are now added using middleware.json.
There was a problem hiding this comment.
Yes i know, but in the example app these new lines were added to it, shouldn't we also add these here?
"files": {
"serve-static": {
"params": "$!../client"
}
},https://github.com/strongloop/loopback-example-app/blob/master/server/middleware.json#L26
There was a problem hiding this comment.
@bajtos suggested that it be removed from the template.
I think a SPA client should not be a part of "API Server" template, please remove this middleware.
There was a problem hiding this comment.
Yes i know, but in the example app these new lines were added to it, shouldn't we also add these here?
No, we shouldn't. This template is generating an "API server", the example application is built on top of this template (but it's not the same!).
In particular, the static client is configured here: https://github.com/strongloop/generator-loopback/blob/01a38d519e4b3c8b63c10a3a84c43c1b24aefdaa/example/index.js#L401-L421
There was a problem hiding this comment.
@hacksparrow please remove serve-static from package.json dependencies since it's not used.
There was a problem hiding this comment.
Actually I can take care of that myself, to speed things up.
|
@hacksparrow we have renamed loopback-explorer to loopback-component-explorer in the meantime, could you take that into account too? See https://github.com/strongloop/loopback-example-app/pull/79 |
|
@bajtos I thought I replaced all instances of |
You are right, I must have missed that. |
|
Landed via 18053ce, thank you for the contribution. I had to also fix server/server.js to correctly load the new explorer component. |
|
Released in |
The problem was brought into light by strongloop/loopback-workspace#230
This PR updates the templates to loopback 2 conventions, along with the updated name of the explorer,
loopback-component-explorer.