Skip to content

Commit

Permalink
Update Readme with new headers syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoScondoo committed Mar 25, 2017
1 parent 4128de9 commit f94d40e
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
- [4. Create the API](#4-create-the-api)

<!-- /TOC -->
#1.Intro
##Needs to make a web server
# 1.Intro
## Needs to make a web server

* Better ways to organize our code into reusable pieces
* Ways to deal with files
Expand All @@ -107,8 +107,8 @@
* A way to deal with work that takes long time


#2.Modules, Export and Require
##Modules
# 2.Modules, Export and Require
## Modules
Reusable block of code whose existence does not accidentally impact other code

**Common JS Modules**
Expand Down Expand Up @@ -150,7 +150,7 @@ A block of code that results in a value
});
```

##Build a module
## Build a module

**app.js**
```javascript
Expand All @@ -167,13 +167,13 @@ A block of code that results in a value

module.exports = greet;
```
####Name value pair
#### Name value pair
A name which maps to a value.
The name can be defined more than once, but only can have one value in any given **context**
`Address = "Sesam street"`
####Object
#### Object
Collection of name/value pairs
####Object Literal
#### Object Literal
Name/value pairs separated by commas and surrounded by curly braces
```javascript

Expand Down Expand Up @@ -416,8 +416,8 @@ Revealing module pattern: Exposing only the properties and methods you want via
import * as greetr from 'greet';
greetr.greet();
```
#3.Events And EventEmitter
##Events
# 3.Events And EventEmitter
## Events
Something that has happened in our application that we can respond to

* **System Events**: C++ core (libuv)
Expand Down Expand Up @@ -692,7 +692,7 @@ We need the object that inherits to also have the `this` methods and properties
}
```

#4.Synchrony
# 4.Synchrony
Javascript is synchronous
Node.js is asynchronous
#### libuv
Expand Down Expand Up @@ -823,7 +823,7 @@ In node read from Readable stream to a Writable stream
A Method returns an object so we can keep calling more methods.
When it returns the parent object is called "cascading".

#5.HTTP
# 5.HTTP
#### Protocol
A set of rules two sides agree on the use communicating.
IP : Internet Protocol. Addresses
Expand Down Expand Up @@ -948,7 +948,7 @@ Get data in the server from parameters in the http call.

}).listen(1337, '127.0.0.1');
```
#6.NPM
# 6.NPM
#### Semantic Versioning
MAYOR.MINOR.PATCH
## Package.json
Expand Down Expand Up @@ -982,7 +982,7 @@ They are stored at `/usr/local/lib/node_modules/npm/node_modules`
#### nodemon
It watches changes in the folder

#7.Express
# 7.Express
```javascript

var express = require('express');
Expand Down Expand Up @@ -1240,7 +1240,7 @@ Using controllers
});
}
```
#8.MEAN
# 8.MEAN
#### DOM
Document Object Model
The structure browsers use to store and manage web pages
Expand Down Expand Up @@ -1380,8 +1380,8 @@ We can set in the server what we show in client
this.people = clientPeople;
}
```
#9.Build an app
##1. Init
# 9.Build an app
## 1. Init
*1 `npm init`
*2 `npm install express --save-dev`
*3 `npm install ejs --save-dev`
Expand All @@ -1402,7 +1402,7 @@ We can set in the server what we show in client

app.listen(port);
```
##2. Connect to the Database
## 2. Connect to the Database
mLab.com
**config/config.json**
```javascript
Expand Down Expand Up @@ -1460,7 +1460,7 @@ mLab.com

app.listen(port);
```
##3. Adding Data
## 3. Adding Data

**controllers/setupController.js**
```javascript
Expand Down Expand Up @@ -1522,7 +1522,7 @@ mLab.com
Run
`http://localhost:3000/api/setupTodos`

##4. Create the API
## 4. Create the API
**controllers/apiController**
```javascript

Expand Down

0 comments on commit f94d40e

Please sign in to comment.