acmeair / acmeair-nodejs

A Node.js implementation of the Acme Air Sample Application. With datastore support of MongoDB, Cloudant, Cassandra. With runtime support of Bluemix/CloudFoundry, Docker... With Micro-Services.
Apache License 2.0
109 stars 74 forks source link

Remove instance of 'new require' anti-pattern #21

Open talbenari1 opened 5 years ago

talbenari1 commented 5 years ago

Although it works correctly in Node.js, calling 'require' as a constructor is a discouraged and undocumented behavior, which may break in the future. Note that removing the 'new' keyword does not change functionality.