An open API service indexing awesome lists of open source software.

https://github.com/beebombshell/nodejs-crash-course


https://github.com/beebombshell/nodejs-crash-course

Last synced: 2 months ago
JSON representation

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 ```