fix(guide): Fix all frontmatter

This commit is contained in:
Bouncey
2018-10-19 13:53:51 +01:00
committed by Stuart Taylor
parent 569bd7c3a7
commit 6d511c558a
146 changed files with 926 additions and 1469 deletions

View File

@ -1,3 +1,6 @@
---
title: File System
---
## File System
The Node.js File System module allows you to work with the file system on your computer.
@ -37,7 +40,7 @@ fs.readFile('input.txt', 'utf-8', (err, data) => {
```
The above code reads a file *input.txt* from your computer and returns the content to the console.
### Steps for execution :
### Steps for execution :
* You should have Node.js installed in your computer.
* Create a file *app.js* and paste the above code.
@ -50,7 +53,7 @@ The above code reads a file *input.txt* from your computer and returns the conte
The ```fs.writeFile()``` method takes three arguments - filename, content and a call back function.
Node.js code to write content into file.
Node.js code to write content into file.
```javascript
const fs = require('fs');
@ -65,7 +68,7 @@ fs.writeFile('output.txt', "New content added", (err, data) => {
```
The above code creates a file *output.txt* and add content *New content added* to it.
### Steps for execution :
### Steps for execution :
* You should have Node.js installed in your computer.
* Create a file *app.js* and paste the above code.
@ -77,4 +80,4 @@ The above code creates a file *output.txt* and add content *New content added* t
* [Node.js API](https://nodejs.org/api/fs.html#fs_file_system)
* [W3 Schools](https://www.w3schools.com/nodejs/nodejs_filesystem.asp)

View File

@ -1,3 +1,6 @@
---
title: HTTP
---
## HTTP
Node.js has a set of built-in modules which you can use without any further installation. Similarly **HTTP module** contains a set of functions which are required to transfer data over the Hyper Text Transfer Protocol (HTTP).
@ -27,7 +30,7 @@ http.createServer((req, res) => {
console.log("Server is listening on port no : 8000");
```
### Steps for execution :
### Steps for execution :
* You should have Node.js installed in your computer.
* Create a file *app.js* and paste the above code.