Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d3efbc4

Browse files
committed
Reorganized week 1 directory structure
1 parent bd9ef2e commit d3efbc4

17 files changed

+114
-30
lines changed

.vscode/launch.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
"program": "${workspaceFolder}/week1/src/index.js",
1212
"cwd": "${workspaceFolder}/week1"
1313
},
14+
{
15+
"type": "node",
16+
"request": "launch",
17+
"name": "Launch Week 2",
18+
"program": "${workspaceFolder}/week2/src/index.js",
19+
"cwd": "${workspaceFolder}/week2"
20+
},
1421
{
1522
"type": "node",
1623
"request": "launch",

week1/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ particular need."
1010
2. Previous homework
1111
3. Questions & Answers (Q&A)
1212
4. What is Node.js?
13-
5. Setting up a Node.js project using `npm init`
14-
6. Importing modules using `require`
15-
5. Building an HTTP server using built-in `http` module
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`
16+
1. Built-in, external modules and local files
17+
7. Building an HTTP server using built-in `http` module
1618
1. HTTP methods
1719
2. HTTP status codes
18-
8. Homework
20+
9. Homework
1921

2022
### What is Node.js?
2123

week1/SETUP.md

Lines changed: 0 additions & 24 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

week1/MAKEME.md renamed to week1/homework/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# HackYourFuture Node.js - Homework week 1
22

3+
# Setup
4+
5+
Follow the instructions in this file to set up your environment.
6+
7+
## 1. Fork this repository and clone it to your hard drive
8+
9+
Follow the general homework instructions for this.
10+
11+
## 2. Install dependencies
12+
13+
Change to the directory where you've cloned this repository, then
14+
`week1/homework` directory and finally install dependencies using `npm`.
15+
16+
```bash
17+
cd path/to/your/cloned/repo
18+
cd week1/homework
19+
npm install
20+
```
21+
22+
## 3. Run the project from that directory
23+
24+
```bash
25+
node .
26+
```
27+
328
## Assignment
429

530
Create an HTTP server that can add and subtract from a number, which we will

week1/homework/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "hyf-node-week-1-homework",
3+
"version": "1.0.0",
4+
"description": "HackYourFuture Node.js Week 1 - Homework",
5+
"repository": "https://github.com/HackYourFuture/nodejs.git",
6+
"main": "src/index.js",
7+
"author": "George Sapkin",
8+
"license": "MIT",
9+
"devDependencies": {
10+
"eslint": "^4.2.0",
11+
"eslint-config-standard": "^11.0.0",
12+
"eslint-plugin-import": "^2.7.0",
13+
"eslint-plugin-node": "^6.0.0",
14+
"eslint-plugin-promise": "^3.5.0",
15+
"eslint-plugin-standard": "^3.0.1"
16+
}
17+
}

week1/homework/src/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'use strict';
2+
3+
// Write the homework code in this file

week1/lecture/.eslintrc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"env": {
3+
"es6": true,
4+
"node": true
5+
},
6+
"extends": "standard",
7+
"rules": {
8+
"brace-style": [
9+
"warn",
10+
"stroustrup",
11+
{
12+
"allowSingleLine": true
13+
}
14+
],
15+
"curly": [
16+
"off"
17+
],
18+
"generator-star-spacing": [
19+
"warn",
20+
{
21+
"after": true,
22+
"before": false
23+
}
24+
],
25+
"key-spacing": [
26+
"off"
27+
],
28+
"max-len": [
29+
"warn",
30+
80
31+
],
32+
"no-multi-spaces": [
33+
"off"
34+
],
35+
"semi": [
36+
"error",
37+
"always"
38+
],
39+
"space-before-function-paren": [
40+
"warn",
41+
"never"
42+
],
43+
"standard/array-bracket-even-spacing": [
44+
"off"
45+
],
46+
"standard/object-curly-even-spacing": [
47+
"off"
48+
],
49+
"template-tag-spacing": [
50+
"off"
51+
]
52+
}
53+
}

week1/lecture/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

week1/package.json renamed to week1/lecture/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "hyf-node-week-1",
2+
"name": "hyf-node-week-1-lecture",
33
"version": "1.0.0",
4-
"description": "HackYourFuture Node.js Week 1",
4+
"description": "HackYourFuture Node.js Week 1 - Lecture",
55
"repository": "https://github.com/HackYourFuture/nodejs.git",
66
"main": "src/index.js",
77
"author": "George Sapkin",
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)