diff --git a/Programming_Languages/NodeJS/REST/Create_RESTful_API_with_Express.md b/Programming_Languages/NodeJS/API/Create_RESTful_API_with_Express.md similarity index 100% rename from Programming_Languages/NodeJS/REST/Create_RESTful_API_with_Express.md rename to Programming_Languages/NodeJS/API/Create_RESTful_API_with_Express.md diff --git a/Programming_Languages/NodeJS/REST/Full_example.md b/Programming_Languages/NodeJS/API/Full_example.md similarity index 100% rename from Programming_Languages/NodeJS/REST/Full_example.md rename to Programming_Languages/NodeJS/API/Full_example.md diff --git a/Programming_Languages/NodeJS/REST/Validation.md b/Programming_Languages/NodeJS/API/Validation.md similarity index 100% rename from Programming_Languages/NodeJS/REST/Validation.md rename to Programming_Languages/NodeJS/API/Validation.md diff --git a/Programming_Languages/NodeJS/Modules/Modules.md b/Programming_Languages/NodeJS/Modules/Modules.md index 8eca718..c345c41 100644 --- a/Programming_Languages/NodeJS/Modules/Modules.md +++ b/Programming_Languages/NodeJS/Modules/Modules.md @@ -146,7 +146,7 @@ module.exports = { } ``` -**Both of these structures would be referred to in the same way when importing and using them** +**Both of these structures would be referred to in the same way when importing and using them.** Or you could export an actual class as the default. This is practically the same as the two above other than that you would have to use `new` to initiate an instance of the class. @@ -155,4 +155,5 @@ export default class { foo() {} bar() {} } -``` \ No newline at end of file +``` +Every method and property within the export will be public by default, whether it is an object, class or function. If you wanted to keep certain methods/properties private, the best approach is to define them as variables and functions within the module file but outside of the `export` block. \ No newline at end of file diff --git a/Programming_Languages/NodeJS/Package_management.md b/Programming_Languages/NodeJS/Modules/Package_management.md similarity index 100% rename from Programming_Languages/NodeJS/Package_management.md rename to Programming_Languages/NodeJS/Modules/Package_management.md