# NodeJS

## Module Introduction

### Learning Objectives

* Define what an API is used for
* Use `npm` to start a node server
* Explain what `express` is and what it is used for
* Use `express` to create an API that will accept a `GET` request that returns JSON
* Implement routing to return different resources depending on URL
* Implement query params to return different content (?query=ses)
* Define what each part of CRUD is and what it does
* Process a GET request using Express and Node to retrieve data from memory
* Process a POST request using Express and Node and store data in memory
* Process a DELETE request using Express and Node to remove data from memory
* Install a third party library using `npm`
* Introduce Express Middleware and why it is used.
* Implement Authentication using JSON web tokens or OAuth 2.0 Authentication framework.

## Lessons

{% content-ref url="/pages/-MYoFP5H9SqvJb3AEMQD" %}
[1 - Node and Express 101](/coding-course/class-information/teaching-instructions/node/1-node-and-express-101.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MYoFTHsBCtzMz29C767" %}
[2 - APIs in Node](/coding-course/class-information/teaching-instructions/node/2-apis-in-node.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MYoFU3xw3y4FsYL\_sT0" %}
[3 - Workshop](/coding-course/class-information/teaching-instructions/node/3-workshop.md)
{% endcontent-ref %}

##


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://volunteers.migracode.org/coding-course/class-information/teaching-instructions/node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
