export es6 class nodejs code example Example: how to export a class in node js class TestClass { } module.exports.TestClass = TestClass;