
Best Way to Nodejs Project 📚
Naming Conventions
-
Folders (Directors) names
(this-is-kebab-case)- lowercase and separate words by
(-) - should contain an
indextoexportall files from it - Should contain letters only
- lowercase and separate words by
-
Files names
(this-is-kebab-case)- lowercase and separate words by
(-) - if the file contains a single function make its name the function name
- if the file contains class make the file name as class name
- Should contain letters only
- lowercase and separate words by
-
Constant names
(THIS_IS_SNAKE_CASE)- Should be all upper case and separate words by
( _ ) - Should contain letters only
- Should be all upper case and separate words by
-
Variables names
(camelCase)- Should be camelCase
- Should contain letters only
-
Methods (Functions) names
(camelCase)- Should be camelCase
- should begin with a verb
- should contain letters only
-
Classes names
(PascalCase)- Should as in
PascalCasestart with an uppercase letter with every word likeUserClass - Should be a noun
- Should contain letters only
- Should as in
Related articles
Demystifying the Core: Node.js Internal Caching Mechanisms Explored
Dive deep into the internal caching mechanisms of Node.js to understand how it optimizes performance and how developers can leverage these mechanisms in their applications.
Leveraging Rust for High-Performance Node.js Addons in 2025
Explore how integrating Rust with Node.js can unlock unparalleled efficiency and performance for your applications, making them future-ready for 2025.
10 Steps to Mastering Modular Design in Node.js for Scalable Codebases
Explore the transformative power of modular design in Node.js applications to build scalable, maintainable, and efficient codebases for the future.