You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: week1/README.md
+17-13Lines changed: 17 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,30 @@
1
1
# HackYourFuture Node.js - Reading material week 1
2
2
3
-
"What it really means is that Node.js is not a silver-bullet new platform that
4
-
will dominate the web development world. Instead, it’s a platform that fills a
5
-
particular need."
6
-
7
3
## Agenda
8
4
9
-
1. Recap last week
10
-
2. Previous homework
11
-
3. Questions & Answers (Q&A)
12
-
4. What is Node.js?
13
-
5. Setting up a Node.js project using `npm init` and `package.json`
14
-
6. Installing dependencies using `npm install`
15
-
7. Importing modules using `require`
5
+
1. Recap last week
6
+
2. Previous homework
7
+
3. Questions & Answers (Q&A)
8
+
4. What is Node.js?
9
+
5. Finding documentation
10
+
6. Setting up a Node.js project using `npm init` and `package.json`
11
+
7. Installing dependencies using `npm install`
12
+
8. Importing modules using `require`
16
13
1. Built-in, external modules and local files
17
-
8. Building an HTTP server using built-in `http` module
14
+
9. Building an HTTP server using built-in `http` module
18
15
1. HTTP methods
19
16
2. HTTP status codes
20
-
9. Homework
17
+
10. Homework
21
18
22
19
### What is Node.js?
23
20
21
+
From Node.js' [website]()https://nodejs.org/en/:
22
+
23
+
> Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.
24
+
> Node.js uses an event-driven, non-blocking I/O model that makes it lightweight
25
+
> and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of
26
+
> open source libraries in the world.
27
+
24
28
[What is Node.js? What can you do with it? Why should you use it?](https://medium.com/@paynoattn/what-is-nodejs-what-can-you-do-with-it-why-should-you-use-it-8c8d6df32d6d#.qvbp8g4dq)
> Please help us improve and share your feedback! If you find better tutorials or links, please share them by opening a Pull Request.
2
-
3
1
# HackYourFuture Node.js - Reading material week 3
4
2
5
-
## Today's Meal
3
+
## Agenda
6
4
7
5
1. Recap last Week
8
-
2. Homework
9
-
3. Q&A
10
-
4. Other topics
11
-
5. Typescript vs ES6, transpiling javascript
12
-
7. Testing with Postman
13
-
8. MVC model
14
-
9. Express vs native http library
15
-
6. Building a REST web API for Todos
16
-
17
-
## Check out the database repository [here](https://github.com/HackYourFuture/database)
18
-
And find out how you can prepare for the first database lecture, Jason and Rob have provided a nice Lynda playlist so we can have a flying kick off.
6
+
2. Previous homework
7
+
3. Questions & answers (Q&A)
8
+
4. Testing with Postman
9
+
5. Express.js vs native `http` library
10
+
6. Building a REST API for To-dos
11
+
7. Homework
19
12
20
13
# TODO API
21
14
22
-
This is an Express application using `bodyParser` middleware to convert the request body to JSON.
15
+
This is an Express application using `bodyParser` middleware to convert the
16
+
request body to JSON.
23
17
24
18
There are currently four actions:
25
19
@@ -30,15 +24,17 @@ There are currently four actions:
30
24
31
25
## Directory structure
32
26
33
-
-`actions`: Contains the actions as listed above, each as a express handler (function accepting request and response)
27
+
-`actions`: Contains the actions as listed above, each as an Express handler
28
+
(i.e. function accepting request and response)
34
29
-`data`: Contains the data file `todos.json`
35
30
-`models`: Contains the Todo model class
36
31
-`util`: Utility functions
37
32
-`index.js` The application file
38
33
39
34
## Request body format
40
35
41
-
When calling the `create` or `update` actions, the request body should look like this:
36
+
When calling the `create` or `update` actions, the request body should look like
37
+
this:
42
38
43
39
```json
44
40
{
@@ -56,4 +52,11 @@ In Postman, make sure to add this header, and set the Body type to "Raw".
56
52
57
53
## UUIDs
58
54
59
-
For IDs, this application uses "UUIDs" (Universally Unique IDs). They can be generated using the `uuid` package, and are guaranteed never to be the same.
55
+
For IDs, this application uses "UUIDs" (Universally Unique IDs). They can be
56
+
generated using the `uuid` package, and are guaranteed never to be the same.
57
+
58
+
## Prepare for next module
59
+
60
+
Check out the [databases repository](https://github.com/HackYourFuture/databases)
61
+
and find out how you can prepare for the first database lecture, Jason and Rob
62
+
have provided a nice Lynda playlist so we can have a flying kick off.
0 commit comments