Closed thebergamo closed 8 years ago
My init function in server.ts it's responsible to create the server and pass it through the plugins, then return the server.
I'll invest some time checking that branch! If you want to discuss something about this project or yours I'm available :)
Obrigado pelo feedback :+1:
I mean this init function: https://github.com/Talento90/typescript-node/blob/master/src/tasks/index.ts#L6
Maybe is just a confusion about TypeScript
I create an instance of server and then I pass it through all plugins and then all features.
plugin.register(server, pluginOptions);
Tasks.init(server, configs, database);
Users.init(server, configs, database);
https://github.com/Talento90/typescript-node/blob/master/src/server.ts
TypeScript is the same as JavaScript but better hehe :+1:
Haha that's right!
I'm not sure about TS better than JS :p
But looking your code, have some interesting features.
Nice project! I love some decissions about the structure and other things, just some doubts about typescript, just for curiosity.
In your feature
index.ts
files, you send in the init method the Hapi Server, this server are not sended in the plugin's load?By the way, I strong recomending you see this branch https://github.com/thebergamo/start-hapiness/tree/dev-2.0
Btw, again nice project :D