adds code


I recorded a video on how to setup a project with modern Node.js, and I realized it would be helpful to share officially by way of YouTube as well! ESM and JSDoc type checking is a really nice place to start for writing solid code, be it the browser or Node.js. This video is for Node.js in particular. The parts around the `tsconfig.json` apply to anything JavaScript-related though. It makes it very simple to move to full on TypeScript down the line as well, because it's only a matter of renaming your file extensions to `.ts`, then using IDE refactoring to "Annotate everything with types from JSDoc". I think converting untyped projects to TypeScript is really easy with this method too, because you don't have to change the build step in order to get type checking working. You can check out the code itself in a repo on GitHub, if you'd like a more hands-on example to work with. https://github.com/Offroaders123/node-demo
Previous Post Next Post