https://github.com/beebombshell/nodejs-crash-course
https://github.com/beebombshell/nodejs-crash-course
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/beebombshell/nodejs-crash-course
- Owner: BeeBombshell
- Created: 2022-06-29T10:46:58.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-26T12:06:16.000Z (over 3 years ago)
- Last Synced: 2025-01-19T21:43:45.342Z (over 1 year ago)
- Language: JavaScript
- Size: 48.8 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NodeJS Crash Course :dart:
*Techniques used in this course: Node*
:pushpin: - Exploring NodeJS fundamentals including built-in modules like path, fs, os, etc.
:pushpin: - Creating an HTTP server without using ExpressJS.
### Pre-requisites :technologist:
- JS fundamentals: variables, loops, conditionals, functions, arrays, objects, etc.
- HTTP
- JSON
- Arrow functions
- Promises
- MVC Pattern (Model View Controller)
### Advantages
Advantages:
- Fast, efficient, highly scalable.
- Event driven, non-blocking I/O Model.
- Popular in industry.
- Same language on frontend and backend.
### Non-Blocking I/O
-Works on a single thread using non-blocking I/O calls.
### Node's Event Loops
- Single Threaded.
- Supports concurrency via events and callbacks.
- EventEmitter class is used to bind events and listeners.
### Best types of projects for NodeJS
- REST API and Microservices
- Real Time Services (Chat, Live Updates)
- CRUD Apps - Blogs, Shopping Carts, Social Networks, etc.
- Tools and Utilities (anything that is not CPU intensive)
### NPM (Node Package Manager)
- Node Package Manager is a package manager for NodeJS packages or modules.
3rd party modules installed via NPM: express, body-parser, mongoose, etc.
Custom Modules (files) can be created and exported to be used in other files.
Node Core Modules: path, fs, http, etc
Very helpful documentation.
------------------------------------------------------------------------------------------------------------------
- To check node version:
```node --version```
- Open node terminal using:
```node```
- Initialize a project:
```npm init```
- Install a package:
```npm install ```
- Install a package as a dev dependency:
```npm install --save-dev```
- Install a package globally:
```npm install -g ```