Below you will find pages that utilize the taxonomy term “NodeJs”

Post

Hugo + Node.js Koa App Connected to MongoDB

This project demonstrates how to create a development environment utilizing a Docker stack of Nginx to serve the static website, Nodejs for the api applications, MongoDB for the api data and Traefik for reverse proxy. This stack is suitable for deployment to staging and production environments. Prerequisites These products will need to be installed in order to complete this tutorial. Docker Docker Compose Hugo Node.js Project Setup Create a directory for the entire project, e.
Docker

Node.js Koa Container

An example of how to create a Docker container application using Koa.js Next generation web framework for Node.js. In the project root, initialize using Yarn or npm. yarn init -y Install dependencies. yarn add koa yarn add koa-body yarn add koa-logger yarn add koa-router yarn add koa-views yarn add swig Create an app folder in the project root. In the app folder, create a folder named lib.
Javascript

Node.js

A collection of useful Node.js code snippets and resources. HTTP Server An easy way to get a Node.js http server up and running is by installing the http-server node module globally, npm install http-server -g. Here is an example using the -a option to specify an address to use. For more options, run http-server --help. http-server -a localhost http-server default is to use address 0.0.0.0 which is reachable by all IP addresses of the local machine’s network interface.
Post

Handlebars Templates with Browserify

This post documents how to use the hbsfy precompiler plugin for Browserify to compile Handlebars templates into javascript. With this design, templates can be required as javascript modules in the views that use them. Requirements Node.js which includes NPM. Browserify Gulp Command shell such as terminal, Cygwin or Bash on Ubuntu on Windows. Code Editor. Global Packages List the global packages that are installed with the npm list –global command.
Post

BrowserSync SSI Recipe

BrowserSync is my Node.js web browser app development server of choice. This gulpfile is a work in progress to address support for server side includes when using a BrowserSync static server. gulpfile.js var gulp = require('gulp'); var browserSync = require('browser-sync').create(); var minimist = require('minimist'); var serverConfig = { site: './src', directory: false, host: 'localhost', ssi: '.inc', index: 'index.html' } // from https://github.com/gulpjs/gulp/blob/master/docs/recipes/pass-arguments-from-cli.md // seems to make sense since gulp itself uses minimist.
Post

Bootstrap Customization

This tutorial covers using Git to clone, branch and merge the latest Bootstrap source code, modifying and compiling your modifications to the source LESS variables using Grunt and viewing your compiled changes with a local Node.js web server. If you are not familiar with Git, Node.js and Grunt, please read my previous post, Grunt JavaScript Task Runner to help get you started. You could just use the Bootstrap customize and download form to customize the LESS variables and download a pre-compiled Bootstrap package.
Post

Grunt JavaScript Task Runner

This tutorial describes how to setup and use the Grunt JavaScript task runner to automate repetitive tasks such as minification and compilation. Grunt is installed using npm, the Node.js package manager. You will also need Git to work with the tagged source code. This makes it easy to reset and compare your working copy of the code at each step. I discovered commit tags while using the AngularJS tutorial.