Fullstackbook Ch1 Ch2
I’m working through a copy of Modern Full-Stack Development: Using TypeScript, React, Node.js, Webpack, and Docker to try and get more familiar with putting all of the pieces together.
So far I’ve made my way thru chapters one and two. Starting with basic Node.js and Node Package Manager information, it’s been nice to start at the basics and learn all the commands in the right order. Nothing wrong with learning just enough to keep moving, but also kind of nice to see the how it should be done as well.
Node is a way to run javascript serverside in an executable fashion. It allows you to organize your project as a package, which can include dependencies of other packages to extend the functionality of your project. You can also create your own packages that are exportable to extend your own funtionality.
Commonly, you will see something like:
// fs is a built in node module that handles the file system
const fs = require("fs");
// arguably a core component of node, allows you to create a server
const http = require("http");
http.createServer (req, res => {
// do server stuff
});
Speaking of packages (oh god,) npm, or Node Package Manager, allows you to bundle up all your node goodness into a package, using a handy dandy package.json
file. This file contains things like the project name, author, license. Also any dependencies it might have, and any scripts to be used to help maintain the application lifecycle.
I’m also trying to take good notes as a way to encourage better retention of the information. This means I’m getting only a few pages done a night, but hopefully I can continue working through it.
Cheers for the night!
-emosapien