You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should de couple all parts of DietJS that are at present bound to the listen function.
we should export a method that creates the server
and should export a method that creates the Host so that
http.createServer(diet.hosts['app in this array']).listen(9011);
maybe rename diet.hosts that get matched to diet apps so that it gets clear that this are complet diet.apps
so that we can create apps for hostmatches in
diet=requirediet// returns server and app part but app partserver=diet.server()// init diet server object// allwo to give app as options and if not given a diet.app() instance we simply init one and return that as app to that hostserver.listen({location: '', app1})app1=diet.app()// returns only app relevant parts not the server partsapp2=diet.app()// returns only app relevant parts not the server parts
if app not present simply use diet (this)
this will then allow more clear app seperation and less confusing when listing with more then one diet instance.
some people even dont understand that diet = require diet is a object thats not allowed to be re instanced if you make many apps it only works with seperated files because nodejs returns same object for already required objects.
The text was updated successfully, but these errors were encountered:
We should de couple all parts of DietJS that are at present bound to the listen function.
we should export a method that creates the server
and should export a method that creates the Host so that
maybe rename diet.hosts that get matched to diet apps so that it gets clear that this are complet diet.apps
so that we can create apps for hostmatches in
if app not present simply use diet (this)
this will then allow more clear app seperation and less confusing when listing with more then one diet instance.
some people even dont understand that diet = require diet is a object thats not allowed to be re instanced if you make many apps it only works with seperated files because nodejs returns same object for already required objects.
The text was updated successfully, but these errors were encountered: