Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

[WIP]Express#23

Open
drymek wants to merge 7 commits intobrainhubeu:masterfrom
drymek:express
Open

[WIP]Express#23
drymek wants to merge 7 commits intobrainhubeu:masterfrom
drymek:express

Conversation

@drymek
Copy link
Contributor

@drymek drymek commented Jun 10, 2018

Removes express from an application (hadron demo). Instead, it's moved into hadron-express itself.
It introduces also sequence for plugin registration.

container: IContainer,
config: IHadronExpressConfig,
) => {
const port = process.env.PORT || 8080;
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 make a possibility to change the default port in the config object.

expressApp.use(bodyParser.json());
container.register('server', expressApp);
container.register('serverListen', () => {
expressApp.listen(port);
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be executed maybe after all packages would load (maybe using hadron-events package) or there could be an option in config's objects to disable auto-executing listen method and do it manually - with that option there should be a possibility to provide more custom parameters (https://expressjs.com/en/api.html#app.listen).

@szymonbrainhub szymonbrainhub changed the title Express [wip]Express Jun 11, 2018
@szymonbrainhub szymonbrainhub changed the title [wip]Express [WIP]Express Jun 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants