Here the user.js file with class and exports
class User {
static async select() {
const selectResult = await usersDAL.listUsers();
return camelizeKeys(selectResult);
}
}
module.exports.User = User;
I want to use in usersApi file
router.get('/',(req, res) =>{
let userList = new User().select();
res.send(userList);
});
error show
(intermediate value).select is not a function
Please help me