Archive for the Node.js Category

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…

Passing An Array of Objects to a View Using Express Handlebars and Control Structures in the View
Posted on August 6, 2016 in Node.js by Matt Jennings

/server.js File Example

// Module that deals with routing and
// “require” loads an additional library
var express = require(‘express’);

// Express handlebars module
Read more…

To Top ↑