NodeGroup2 / autocomplete-project

An autocomplete app
https://nodetojoy-autocomplete.herokuapp.com/
MIT License
0 stars 2 forks source link

Funky module.exports usage #74

Open eliasmalik opened 7 years ago

eliasmalik commented 7 years ago

This is ingenious, but as far as I know, not a standard node pattern, and could be confusing to some.

Asynchronous functions are recommended in general because they mean your server is non-blocking and can deal with more requests. However, for things that happen before the server is running, there is no reason not to use sync methods if they make your life easier, because concurrency is not a requirement.