Archive for the Node.js Category

Basic Examples of Asynchronous Function Using Node.js
Posted on September 22, 2020 in JavaScript, Node.js by Matt Jennings

Running Code Asynchronously

The console.log(number3) code, which outputs the text of the number3.txt file below that is in the same directory
Read more…

How to Review GitHub Pull Requests When Building a Node.js App
Posted on October 21, 2019 in Git, GitHub, Node.js by Matt Jennings

In a GitHub repo checkout the Pull Request (PR) branch name, like cool-feature-branch.
In your Terminal, to fetch all remote branches
Read more…

Express Code Used for Form Submissions
Posted on August 21, 2019 in Expresss, Node.js by Matt Jennings

When NOT using body-parser the two lines of code must be used for form submissions:

// Sets up the
Read more…

Node.js module.exports and require Examples
Posted on July 22, 2019 in Node.js by Matt Jennings

band.js Output

module.exports = {
punk: ‘Sex Pistols’,
rap: ‘Public Enemy’,
Read more…

URL Parameters in Express.js
Posted on August 22, 2016 in Node.js by Matt Jennings

Example of a URL parameter that uses Express.js

// Route for each poll
// and “:poll_id” is a URL parameter
Read more…

To Top ↑