Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add onkrakenmount property; removed node v4, v6 and added node 10 in travis CI config #514

Merged
merged 9 commits into from
Jan 28, 2020

Conversation

kumarrishav
Copy link
Member

@kumarrishav kumarrishav commented Nov 26, 2019

moving the implementation details from #513

This will let have modules the app instance once Kraken (express sub-app) mounts.

@kumarrishav kumarrishav changed the title add onbootstrapinit property add onbootstrapinit property; remove node 4 and added node 10 in travis CI config Nov 26, 2019
@kumarrishav
Copy link
Member Author

kumarrishav commented Nov 26, 2019

@tlivings @aheckmann @grawk @shaunwarman review?

@kumarrishav kumarrishav changed the title add onbootstrapinit property; remove node 4 and added node 10 in travis CI config add onkrakenmount property; remove node 4 and added node 10 in travis CI config Nov 26, 2019
lib/bootstrap.js Outdated
@@ -27,6 +27,10 @@ var debug = require('debuglog')('kraken/bootstrap');

module.exports = function (app, options) {

// on bootstrapinit
const onbootstrapinit = options.onbootstrapinit;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that this is invoked when kraken is mounted in an express app and express app instance is available to pass down the callback function. Thoughts on calling this as onkrakenmount or onmount?

@kumarrishav kumarrishav changed the title add onkrakenmount property; remove node 4 and added node 10 in travis CI config add onkrakenmount property; removed node 4 and added node 10 in travis CI config Nov 26, 2019
Copy link
Member

@grawk grawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues with the code change. Would just recommend to remove node 6 from the travis config.

.travis.yml Show resolved Hide resolved
@kumarrishav kumarrishav changed the title add onkrakenmount property; removed node 4 and added node 10 in travis CI config add onkrakenmount property; removed node v4, v6 and added node 10 in travis CI config Nov 26, 2019
test/kraken.js Outdated

options = {
onkrakenmount: function (app) {
const serverListen = app.listen;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should just assert that the app is an express instance.

index.js Outdated Show resolved Hide resolved
@snowinferno snowinferno merged commit 452812f into krakenjs:v2.x Jan 28, 2020
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.

4 participants