BogoToBogo
  • Home
  • About
  • Big Data
  • Machine Learning
  • AngularJS
  • Python
  • C++
  • go
  • DevOps
  • Kubernetes
  • Algorithms
  • More...
    • Qt 5
    • Linux
    • FFmpeg
    • Matlab
    • Django 1.8
    • Ruby On Rails
    • HTML5 & CSS

MEAN Stack : Node ToDo List App with Mongodb

MEAN-Icon.png




Bookmark and Share





bogotobogo.com site search:






Note

In this article, we'll make a ToDo list (https://github.com/epic-math/NodeJS-MEAN.git.

$ mkdir ToDo
$ cd ToDo
$ npm init




package.json & npm install

Now we want to modify package.json:

{
  "name"         : "node-todo",
  "version"      : "0.0.0",
  "description"  : "Simple todo application.",
  "main"         : "server.js",
  "author"       : "Bogotobogo",
  "dependencies" : {
    "express"    : "~4.13.2",
    "mongoose"   : "~3.6.2",
    "morgan"     : "~1.6.1",
    "body-parser": "~1.14.1",
    "method-override": "~2.3.5"
  }
}

When we run npm install, npm consult this file and install dependencies such as Express and Mongoose:

$ sudo npm install

The tilde (~) matches the most recent minor version (the middle number): ~1.2.3 will match all 1.2.x versions but will miss 1.3.0.
The caret (^), on the other hand, is more relaxed. It will update to the most recent major version (the first number). ^1.2.3 will match any 1.x.x release including 1.3.0, but will hold off on 2.0.0.

Because MongoDB is so easy to use, the basic Node.js driver can be the best solution for many applications. However, if we need validations, associations, and other high-level data modeling functions, then an Object Document Mapper (ODM) or Object Relational Mapping (ORM) may be helpful. This means that Mongoose translates data in the database to JavaScript objects for use in our application

Mongoose is an ODM for Node.js. It has a thriving open source community and includes advanced schema-based features such as async validation, casting, object life-cycle management, pseudo-joins, and rich query builder support.






node configuration

In our package.json file, we told Node that our main file would be server.js. This is the main file for our Node app and where we will configure the entire application.





mongodb install & run

Install the MongoDB packages:

$ sudo apt-get install -y mongodb-org

Check installed package list:

$ dpkg --list |grep mongo
ii  mongodb-org                              3.0.6                            amd64        MongoDB open source document-oriented database system (metapackage)
ii  mongodb-org-mongos                       3.0.6                            amd64        MongoDB sharded cluster query router
ii  mongodb-org-server                       3.0.6                            amd64        MongoDB database server
ii  mongodb-org-shell                        3.0.6                            amd64        MongoDB shell client
ii  mongodb-org-tools                        3.0.6                            amd64        MongoDB tools

$ sudo service mongod start




server.js

Here is the code for our Node server (actually, we rename app.js to server.js). In the subsequent sections, we'll see what the code is doing:

// server.js

    // set up ========================
    var express  = require('express');
    var app      = express();                        // create our app w/ express
    var mongoose = require('mongoose');              // mongoose for mongodb
    var morgan   = require('morgan');                // log requests to the console (express4)
    var bodyParser = require('body-parser');         // pull information from HTML POST (express4)
    var methodOverride = require('method-override'); // simulate DELETE and PUT (express4)
    var database = require('./config/database');
    var port     = process.env.PORT || 8888;         // set the port


    // configuration ===============================================================
    mongoose.connect(database.url);     // connect to mongoDB database on modulus.io

    app.use(express.static(__dirname + '/public'));                 // set the static files location /public/img will be /img for users
    app.use(morgan('dev'));                                         // log every request to the console
    app.use(bodyParser.urlencoded({'extended':'true'}));            // parse application/x-www-form-urlencoded
    app.use(bodyParser.json());                                     // parse application/json
    app.use(bodyParser.json({ type: 'application/vnd.api+json' })); // parse application/vnd.api+json as json
    app.use(methodOverride());

    // routes ======================================================================
    require('./app/routes.js')(app);

    // listen (start app with node server.js) ======================================
    app.listen(port);
    console.log("App listening on port : " + port);

require() method is used to load the module into our code.

We just configured the app for Express:

var express  = require('express');
var app      = express();    
var mongoose = require('mongoose');              // mongoose for mongodb
var morgan   = require('morgan');                // log requests to the console (express4)
var bodyParser = require('body-parser');         // pull information from HTML POST (express4)
var methodOverride = require('method-override'); // simulate DELETE and PUT (express4)

app.use() method to bind a middleware function with a specific path.

We'll use mongoose for mongodb and to console logging we use morgan. The body-parser will be used to pull posted info. The method-override let us use HTTP verbs such as PUT or DELETE in places where the client doesn't support it.

Our server will listen to port 8888:

    app.listen(port);
    console.log("App listening on port : " + port);

We will need a schema and a model in order to work with the data that will be persisted in our MongoDB database. Schemas define the structure of documents within a collection and models are used to create instances of data that will be stored in documents. We will be making a database of Todos to keep track. We started off by creating a Todo schema and model:

var Todo = mongoose.model('Todo', {
        text : String
    });

Our model has just the text for the Todo. MongoDB will automatically generate an _id for each Todo that we create.

Notice that the Todo model is capitalized. That's because when a model is compiled, the result is a constructor function that is used to create instances of the model. The instances created from the model constructor are documents which will be persisted by Mongo.






config/database.js

module.exports allows us to pass data from one file to another. Note that just using require('./config/database') doesn't automagically give us access to those variables. module.exports exposes those variables (or functions or anything else) to other files.

// config/database.js

module.exports = {
    url : 'mongodb://localhost/'
};




app/models/todo.js
// app/models/todo.js

// load mongoose since we need it to define a model
var mongoose = require('mongoose');

module.exports = mongoose.model('Todo', {
    text : String,
    done : Boolean
});




RESTful API Routes

Angular accesses data it needs through the Node API. Node connects to the database and returns JSON information to Angular based on the RESTful routing.

mongo-node-angular-diagram.png

Picture source : Creating a Single Page Todo App with Node and Angular

Based on the routes in server.js, we have a table showing how a frontend application should request data from the API:

Method URL Description
GET /api/todos Get all of the todos
POST /api/todos Create a single todo
DELETE /api/todos/:todo_id Delete a single todo

We used the Mongoose actions to help us to interact with our database.

Recall we created our model earlier with:

var Todo = mongoose.model

Now, we can use Todo to GET, POST, and DELETE.





routes.js

Here we'll define our routes file, and we'll just load that in our server.js and pass in our app variable to the function. This way the routes file has access to app and express.

// app/routes.js

// load the todo model
var Todo = require('./models/todo');

// expose the routes to our app with module.exports
module.exports = function(app) {

    // api ---------------------------------------------------------------------
    // get all todos
    app.get('/api/todos', function(req, res) {

        // use mongoose to get all todos in the database
        Todo.find(function(err, todos) {

            // if there is an error retrieving, send the error. nothing after res.send(err) will execute
            if (err)
                res.send(err)

            res.json(todos); // return all todos in JSON format
        });
    });

    // create todo and send back all todos after creation
    app.post('/api/todos', function(req, res) {

        // create a todo, information comes from AJAX request from Angular
        Todo.create({
            text : req.body.text,
            done : false
        }, function(err, todo) {
            if (err)
                res.send(err);

            // get and return all the todos after you create another
            Todo.find(function(err, todos) {
                if (err)
                    res.send(err)
                res.json(todos);
            });
        });

    });

    // delete a todo
    app.delete('/api/todos/:todo_id', function(req, res) {
        Todo.remove({
            _id : req.params.todo_id
        }, function(err, todo) {
            if (err)
                res.send(err);

            // get and return all the todos after you create another
            Todo.find(function(err, todos) {
                if (err)
                    res.send(err)
                res.json(todos);
            });
        });
    });
};

Recall, in our previous section, we required the Express module, then we defined a module function that initializes the Express application. First, it creates a new instance of an Express application, and then it requires the routing file and calls it as a function passing it the application instance as an argument.

In the following code snippet:

module.exports = function(app) {

The routing module function accepts a single argument called app, so when we call this function, we'll need to pass it the instance of the Express application.





public/index.html

public/index.html is the HTML needed to interact with Angular.

<!-- ASSIGN OUR ANGULAR MODULE -->
<html ng-app="bogoTodo">
<head>
    <!-- META -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1"><!-- Optimize mobile viewport -->

    <title>Node/Angular Todo App</title>

    <!-- SCROLLS -->
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"><!-- load bootstrap -->
    <style>
        html                    { overflow-y:scroll; }
        body                    { padding-top:50px; }
        #todo-list              { margin-bottom:30px; }
    </style>

    <!-- SPELLS -->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script><!-- load jquery -->
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js"></script><!-- load angular -->
    <script src="core.js"></script>

</head>
<!-- SET THE CONTROLLER AND GET ALL TODOS -->
<body ng-controller="mainController">
    <div class="container">

        <!-- HEADER AND TODO COUNT -->
        <div class="jumbotron text-center">
            <h1>My Todo List <span class="label label-info">{{ todos.length }}</span></h1>
        </div>

        <!-- TODO LIST -->
        <div id="todo-list" class="row">
            <div class="col-sm-4 col-sm-offset-4">

                <!-- LOOP OVER THE TODOS IN $scope.todos -->
                <div class="checkbox" ng-repeat="todo in todos">
                    <label>
                        <input type="checkbox" ng-click="deleteTodo(todo._id)"> {{ todo.text }}
                    </label>
                </div>

            </div>
        </div>

        <!-- FORM TO CREATE TODOS -->
        <div id="todo-form" class="row">
            <div class="col-sm-8 col-sm-offset-2 text-center">
                <form>
                    <div class="form-group">

                        <!-- BIND THIS VALUE TO formData.text IN ANGULAR -->
                        <input type="text" class="form-control input-lg text-center" placeholder="I want to detect/capture dark matter" ng-model="formData.text">
                    </div>

                    <!-- createToDo() WILL CREATE NEW TODOS -->
                    <button type="submit" class="btn btn-primary btn-lg" ng-click="createTodo()">Add</button>
                </form>
            </div>
        </div>

    </div>

</body>
</html>


Let's run node server:

$ npm start

> node-todo@0.0.0 start /home/k/TEST7/ToDo
> node server.js

App listening on port 7777
GET /core.js 404 30.424 ms - 20


NodeJS-Without-AngularJS.png

As we can see from the output, we're missing public/core.js which is referred from index.html. It should look like this:

<script src="core.js"></script>

Let's add the missing component - Angular!

In next section, our Angular will be setup. We will create a module, controller, and define functions to handle todos.






public/core.js - AngularJS

Here is our AngularJS file, public/core.js:

// public/core.js
var bogoTodo = angular.module('bogoTodo', []);

function mainController($scope, $http) {
    $scope.formData = {};

    // when landing on the page, get all todos and show them
    $http.get('/api/todos')
        .success(function(data) {
            $scope.todos = data;
            console.log(data);
        })
        .error(function(data) {
            console.log('Error: ' + data);
        });

    // when submitting the add form, send the text to the node API
    $scope.createTodo = function() {
        $http.post('/api/todos', $scope.formData)
            .success(function(data) {
                $scope.formData = {}; // clear the form so our user is ready to enter another
                $scope.todos = data;
                console.log(data);
            })
            .error(function(data) {
                console.log('Error: ' + data);
            });
    };

    // delete a todo after checking it
    $scope.deleteTodo = function(id) {
        $http.delete('/api/todos/' + id)
            .success(function(data) {
                $scope.todos = data;
                console.log(data);
            })
            .error(function(data) {
                console.log('Error: ' + data);
            });
    };

}

We created our Angular module, controller (mainController), and our functions to get all todos, create a todo, and delete a todo.

All these will be hitting the API we just created.

On page load, we will GET /api/todos and bind the JSON we receive from the API to $scope.todos. We will then loop over these in our view to make our todos.


NodeJS-With-AngularJS.png

NodeJSTree3.png


We can interact with it at localhost:8888/api/todos to get all the todos:

$ node server.js
App listening on port 8888
GET /api/todos 200 92.535 ms - 113


api-todo-json.png



node.js server as a daemon process

We can daemonize a node.js server.

$ sudo npm install -g forever

$ which forever
/usr/local/bin/forever

Let's start node:

$ forever start server.js
warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info:    Forever processing file: server.js

Check the processes:

$ ps -ef|grep  node|grep -v grep
ubuntu    3557     1  0 22:50 ?        00:00:00 /usr/bin/nodejs /usr/local/lib/node_modules/forever/bin/monitor server.js
ubuntu    3559  3557  0 22:50 ?        00:00:00 /usr/bin/nodejs /home/ubuntu/ToDo/server.js

If we want to stop node, issue the following command:

$ forever stop server.js

Source available at https://github.com/epic-math/NodeJS-MEAN.





Reorganizing front-end

So far, we primarily worked on node side back-end.

The core.js has all the angular portion of code, and we want to move our javascript files and Angular modules into separate files under public folder from core.js. That's because we want our application to be modular so that our controller and all of our $http requests are in their own files.

We may want to upgrade out angular to 1.4.5:

<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>




js/services/todos.js

We want to create our service.

The to-do service is meant to interact with our Node API. We want to have all the code to get, create, or delete a to-do inside our service. This ensures that we can test this code separate of our overall application.

Let's get all that $http code out of core.js.

// js/services/todos.js
angular.module('todoService', [])

    // super simple service
    // each function returns a promise object 
    .factory('Todos', function($http) {
        return {
            get : function() {
                return $http.get('/api/todos');
            },
            create : function(todoData) {
                return $http.post('/api/todos', todoData);
            },
            delete : function(id) {
                return $http.delete('/api/todos/' + id);
            }
        }
    });

We defined our service using .factory with three different functions. get, create and delete will all return promise objects that we can use in our controller.

Note that in Angular, there are many different ways to declare a service (.service, .factory and .provider).





js/controllers/main.js

Now we want to create our Angular module for our controller by moving most of the code from core.js.

// js/controllers/main.js
    
angular.module('todoController', [])

    .controller('mainController', function($scope, $http) {
        $scope.formData = {};

        // when landing on the page, get all todos and show them
        $http.get('/api/todos')
                .success(function(data) {
                        $scope.todos = data;
                })
                .error(function(data) {
                        console.log('Error: ' + data);
                });

        // when submitting the add form, send the text to the node API
        $scope.createTodo = function() {
                $http.post('/api/todos', $scope.formData)
                        .success(function(data) {
                                $scope.formData = {}; // clear the form so our user is ready to enter another
                                $scope.todos = data;
                        })
                        .error(function(data) {
                                console.log('Error: ' + data);
                        });
        };

        // delete a todo after checking it
        $scope.deleteTodo = function(id) {
                $http.delete('/api/todos/' + id)
                        .success(function(data) {
                                $scope.todos = data;
                        })
                        .error(function(data) {
                                console.log('Error: ' + data);
                        });
        };

    });

Though we have our controller and service in their own modules, they won't be able to work together until we inject them into our main application module.






js/core.js

To get everything working together, we just have to load our controller and services, and then inject our controller and service into the main module.

Make sure to move our original core.js file from the root directory into the js folder. This ensures that all our javascript code will be located in the same location.

Here is our code for our new core.js.

// js/core.js

angular.module('bogoTodo', ['todoController', 'todoService']);

We have our main module bogoTodo and then we inject our controller and service.





Putting them all together - using service in controller

We have linked everything but we are not using our new service yet.

Let's inject that into our controller and use it!

// js/controllers/main.js
angular.module('todoController', [])

    // inject the Todo service factory into our controller
    .controller('mainController', function($scope, $http, Todos) {
        $scope.formData = {};

        // GET =====================================================================
        // when landing on the page, get all todos and show them
        // use the service to get all the todos
        Todos.get()
            .success(function(data) {
                $scope.todos = data;
            });

        // CREATE ==================================================================
        // when submitting the add form, send the text to the node API
        $scope.createTodo = function() {

            // validate the formData to make sure that something is there
            // if form is empty, nothing will happen
            // people can't just hold enter to keep adding the same to-do anymore
            if (!$.isEmptyObject($scope.formData)) {

                // call the create function from our service (returns a promise object)
                Todos.create($scope.formData)

                    // if successful creation, call our get function to get all the new todos
                    .success(function(data) {
                        $scope.formData = {}; // clear the form so our user is ready to enter another
                        $scope.todos = data; // assign our new list of todos
                    });
            }
        };

        // DELETE ==================================================================
        // delete a todo after checking it
        $scope.deleteTodo = function(id) {
            Todos.delete(id)
                // if successful creation, call our get function to get all the new todos
                .success(function(data) {
                    $scope.todos = data; // assign our new list of todos
                });
        };
    });

We moved the old $http code outside of our controller and into our service. The service will return a promise object so we can use the data using .success promise.





loading new files - index.html

We need to load up the new files in index.html:

    ...
    <!-- SPELLS -->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script><!-- load jquery -->
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script><!-- load angular -->
    <script src="js/core.js"></script>
    <script src="js/controllers/main.js"></script> <!-- load up our controller -->
    <script src="js/services/todos.js"></script> <!-- load our todo service -->
    <script src="js/core.js"></script> <!-- load our main application -->
    ...



tree-angular.png



Angular Summary
  1. In index.html, we defined an AngularJS application (bogoTodo) using ng-app directive:
    <html ng-app="bogoTodo">
    
  2. Also, we defined a controller (mainController) using ng-controller directive:
    <body ng-controller="mainController">
    
    The mainController function is a JavaScript function, and AngularJS will invoke the controller with a $scope and $http object as we can see in js/controllers/main.js
    angular.module('todoController', [])
        .controller('mainController', function($scope, $http) {
    
    $scope is the application object (the owner of application variables and functions) and $http is an XMLHttpRequest object for requesting external data.
    If success, the controller creates a property (todos) in the scope, with JSON data from the server:
            $http.get('/api/todos')
                    .success(function(data) {
                            $scope.todos = data;
                    })
    
  3. The syntax for angular.module() is:
    angular.module(name, [requires], [configFn]);
    
    where:
    1. name: The name of the module to create or retrieve.
    2. requires: If specified then new module is being created. If unspecified then the module is being retrieved for further configuration.
    3. configFn: Optional configuration function for the module.
    The angular.module is a global place for creating, registering and retrieving Angular modules.
    All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism.
    Passing one argument retrieves an existing angular.Module, whereas passing more than one argument creates a new angular.Module
    It returns a new module with the angular.Module api.
    See angular.module
    var app = angular.module("myApp", []);
    
    Note that the [] parameter in the module definition can be used to define dependent modules. This is where dependency injection comes in because our module might actuallyh rely on other modules to get data.
  4. In public/js/core.js, we inject another controller (todoController) and a service (todoService) into our main application module.
    angular.module('bogoTodo', ['todoController', 'todoService']);
    
  5. The factory constructs a new service using a function with zero or more arguments (these are dependencies on other services).
    // js/services/todos.js
    angular.module('todoService', [])
    
        // each function returns a promise object 
        .factory('Todos', function($http) {
            return {
                get : function() {
                    return $http.get('/api/todos');
                },
    
    The return value of this function is the service instance created by the factory.




Refs

Here is the list of references:

  1. Creating a Single Page Todo App with Node and Angular








Node.JS

  • Node.js
  • MEAN Stack : MongoDB, Express.js, AngularJS, Node.js
  • MEAN Stack Tutorial : Express.js with Jade template
  • Building REST API with Node and MongoDB
  • Nginx reverse proxy to a node application server managed by PM2
  • Jade Bootstrap sample page with Mixins
  • Real-time polls application I - Express, Jade template, and AngularJS modules/directives
  • Real-time polls application II - AngularJS partial HTML templates & style.css
  • Node ToDo List App with Mongodb
  • Node ToDo List App with Mongodb - II (more Angular)
  • Authentication with Passport
  • Authentication with Passport 2
  • Authentication with Passport 3 (Facebook / Twitter Login)
  • React Starter Kit
  • Meteor app with React
  • MEAN Stack app on Docker containers : micro services
  • MEAN Stack app on Docker containers : micro services via docker-compose









  • Ph.D. / Golden Gate Ave, San Francisco / Seoul National Univ / Carnegie Mellon / UC Berkeley / DevOps / Deep Learning / Visualization

    YouTubeMy YouTube channel

    Sponsor Open Source development activities and free contents for everyone.

    Thank you.

    - K Hong







    Node.JS



    Node.js

    MEAN Stack : MongoDB, Express.js, AngularJS, Node.js

    MEAN Stack Tutorial : Express.js with Jade template

    Building REST API with Node and MongoDB

    Nginx reverse proxy to a node application server managed by PM2

    Jade Bootstrap sample page with Mixins

    Real-time polls application I - Express, Jade template, and AngularJS modules/directives

    Real-time polls application II - AngularJS partial HTML templates & style.css

    Node ToDo List App with Mongodb

    Node ToDo List App with Mongodb - II (more Angular)

    Authentication with Passport

    Authentication with Passport 2

    Authentication with Passport 3 (Facebook / Twitter Login)

    React Starter Kit

    Meteor app with React

    MEAN Stack app on Docker containers : micro services

    MEAN Stack app on Docker containers : micro services via docker-compose




    Sponsor Open Source development activities and free contents for everyone.

    Thank you.

    - K Hong







    AngularJS



    Introduction

    Directives I - ng-app, ng-model, and ng-bind

    Directives II - ng-show, ng-hide, and ng-disabled

    Directives III - ng-click with toggle()

    Expressions - numbers, strings, and arrays

    Binding - ng-app, ng-model, and ng-bind

    Controllers - global controllers, controller method, and external controllers

    Data Binding and Controllers (Todo App)

    Todo App with Node

    $scope - A glue between javascript (controllers) and HTML (the view)

    Tables and css

    Dependency Injection - http:fetch json & minification

    Filters - lower/uppercase, currenty, orderBy, and filter:query with http.get()

    $http - XMLHttpRequest and json file

    Module - module file and controller file

    Forms

    Routes I - introduction

    Routes II - separate url template files

    Routes III - extracting and using parameters from routes

    Routes IV - navigation between views using links

    Routes V - details page

    AngularJS template using ng-view directive : multiple views

    Nested and multi-views using UI-router, ngRoute vs UI-router

    Creating a new service using factory

    Querying into a service using find()

    angular-seed - the seed for AngularJS apps

    Token (JSON Web Token - JWT) based auth backend with NodeJS

    Token (JSON Web Token - JWT) based auth frontend with AngularJS

    Twitter Bootstrap

    Online resources - List of samples using AngularJS (Already launched sites and projects)

    Meteor Angular App with MongoDB (Part I)

    Meteor Angular App with MongoDB (Part II - Angular talks with MongoDB)

    Meteor Angular App with MongoDB (Part III - Facebook / Twitter / Google logins)

    Scala/Java Play app with Angular

    Laravel 5 / Angular Auth using JSON Web Token (JWT) - Prod

    Scala/Java Play app with Angular







    Docker & K8s



    Docker install on Amazon Linux AMI

    Docker install on EC2 Ubuntu 14.04

    Docker container vs Virtual Machine

    Docker install on Ubuntu 14.04

    Docker Hello World Application

    Nginx image - share/copy files, Dockerfile

    Working with Docker images : brief introduction

    Docker image and container via docker commands (search, pull, run, ps, restart, attach, and rm)

    More on docker run command (docker run -it, docker run --rm, etc.)

    Docker Networks - Bridge Driver Network

    Docker Persistent Storage

    File sharing between host and container (docker run -d -p -v)

    Linking containers and volume for datastore

    Dockerfile - Build Docker images automatically I - FROM, MAINTAINER, and build context

    Dockerfile - Build Docker images automatically II - revisiting FROM, MAINTAINER, build context, and caching

    Dockerfile - Build Docker images automatically III - RUN

    Dockerfile - Build Docker images automatically IV - CMD

    Dockerfile - Build Docker images automatically V - WORKDIR, ENV, ADD, and ENTRYPOINT

    Docker - Apache Tomcat

    Docker - NodeJS

    Docker - NodeJS with hostname

    Docker Compose - NodeJS with MongoDB

    Docker - Prometheus and Grafana with Docker-compose

    Docker - StatsD/Graphite/Grafana

    Docker - Deploying a Java EE JBoss/WildFly Application on AWS Elastic Beanstalk Using Docker Containers

    Docker : NodeJS with GCP Kubernetes Engine

    Docker : Jenkins Multibranch Pipeline with Jenkinsfile and Github

    Docker : Jenkins Master and Slave

    Docker - ELK : ElasticSearch, Logstash, and Kibana

    Docker - ELK 7.6 : Elasticsearch on Centos 7 Docker - ELK 7.6 : Filebeat on Centos 7

    Docker - ELK 7.6 : Logstash on Centos 7

    Docker - ELK 7.6 : Kibana on Centos 7 Part 1

    Docker - ELK 7.6 : Kibana on Centos 7 Part 2

    Docker - ELK 7.6 : Elastic Stack with Docker Compose

    Docker - Deploy Elastic Cloud on Kubernetes (ECK) via Elasticsearch operator on minikube

    Docker - Deploy Elastic Stack via Helm on minikube

    Docker Compose - A gentle introduction with WordPress

    Docker Compose - MySQL

    MEAN Stack app on Docker containers : micro services

    Docker Compose - Hashicorp's Vault and Consul Part A (install vault, unsealing, static secrets, and policies)

    Docker Compose - Hashicorp's Vault and Consul Part B (EaaS, dynamic secrets, leases, and revocation)

    Docker Compose - Hashicorp's Vault and Consul Part C (Consul)

    Docker Compose with two containers - Flask REST API service container and an Apache server container

    Docker compose : Nginx reverse proxy with multiple containers

    Docker compose : Nginx reverse proxy with multiple containers

    Docker & Kubernetes : Envoy - Getting started

    Docker & Kubernetes : Envoy - Front Proxy

    Docker & Kubernetes : Ambassador - Envoy API Gateway on Kubernetes

    Docker Packer

    Docker Cheat Sheet

    Docker Q & A

    Kubernetes Q & A - Part I

    Kubernetes Q & A - Part II

    Docker - Run a React app in a docker

    Docker - Run a React app in a docker II (snapshot app with nginx)

    Docker - NodeJS and MySQL app with React in a docker

    Docker - Step by Step NodeJS and MySQL app with React - I

    Installing LAMP via puppet on Docker

    Docker install via Puppet

    Nginx Docker install via Ansible

    Apache Hadoop CDH 5.8 Install with QuickStarts Docker

    Docker - Deploying Flask app to ECS

    Docker Compose - Deploying WordPress to AWS

    Docker - WordPress Deploy to ECS with Docker-Compose (ECS-CLI EC2 type)

    Docker - ECS Fargate

    Docker - AWS ECS service discovery with Flask and Redis

    Docker & Kubernetes: minikube version: v1.31.2, 2023

    Docker & Kubernetes 1 : minikube

    Docker & Kubernetes 2 : minikube Django with Postgres - persistent volume

    Docker & Kubernetes 3 : minikube Django with Redis and Celery

    Docker & Kubernetes 4 : Django with RDS via AWS Kops

    Docker & Kubernetes : Kops on AWS

    Docker & Kubernetes : Ingress controller on AWS with Kops

    Docker & Kubernetes : HashiCorp's Vault and Consul on minikube

    Docker & Kubernetes : HashiCorp's Vault and Consul - Auto-unseal using Transit Secrets Engine

    Docker & Kubernetes : Persistent Volumes & Persistent Volumes Claims - hostPath and annotations

    Docker & Kubernetes : Persistent Volumes - Dynamic volume provisioning

    Docker & Kubernetes : DaemonSet

    Docker & Kubernetes : Secrets

    Docker & Kubernetes : kubectl command

    Docker & Kubernetes : Assign a Kubernetes Pod to a particular node in a Kubernetes cluster

    Docker & Kubernetes : Configure a Pod to Use a ConfigMap

    AWS : EKS (Elastic Container Service for Kubernetes)

    Docker & Kubernetes : Run a React app in a minikube

    Docker & Kubernetes : Minikube install on AWS EC2

    Docker & Kubernetes : Cassandra with a StatefulSet

    Docker & Kubernetes : Terraform and AWS EKS

    Docker & Kubernetes : Pods and Service definitions

    Docker & Kubernetes : Headless service and discovering pods

    Docker & Kubernetes : Service IP and the Service Type

    Docker & Kubernetes : Kubernetes DNS with Pods and Services

    Docker & Kubernetes - Scaling and Updating application

    Docker & Kubernetes : Horizontal pod autoscaler on minikubes

    Docker & Kubernetes : NodePort vs LoadBalancer vs Ingress

    Docker & Kubernetes : Load Testing with Locust on GCP Kubernetes

    Docker & Kubernetes : From a monolithic app to micro services on GCP Kubernetes

    Docker & Kubernetes : Rolling updates

    Docker & Kubernetes : Deployments to GKE (Rolling update, Canary and Blue-green deployments)

    Docker & Kubernetes : Slack Chat Bot with NodeJS on GCP Kubernetes

    Docker & Kubernetes : Continuous Delivery with Jenkins Multibranch Pipeline for Dev, Canary, and Production Environments on GCP Kubernetes

    Docker & Kubernetes - MongoDB with StatefulSets on GCP Kubernetes Engine

    Docker & Kubernetes : Nginx Ingress Controller on minikube

    Docker & Kubernetes : Setting up Ingress with NGINX Controller on Minikube (Mac)

    Docker & Kubernetes : Nginx Ingress Controller for Dashboard service on Minikube

    Docker & Kubernetes : Nginx Ingress Controller on GCP Kubernetes

    Docker & Kubernetes : Kubernetes Ingress with AWS ALB Ingress Controller in EKS

    Docker & Kubernetes : MongoDB / MongoExpress on Minikube

    Docker & Kubernetes : Setting up a private cluster on GCP Kubernetes

    Docker & Kubernetes : Kubernetes Namespaces (default, kube-public, kube-system) and switching namespaces (kubens)

    Docker & Kubernetes : StatefulSets on minikube

    Docker & Kubernetes : StatefulSets on minikube

    Docker & Kubernetes : RBAC

    Docker & Kubernetes Service Account, RBAC, and IAM

    Docker & Kubernetes - Kubernetes Service Account, RBAC, IAM with EKS ALB, Part 1

    Docker & Kubernetes : Helm Chart

    Docker & Kubernetes : My first Helm deploy

    Docker & Kubernetes : Readiness and Liveness Probes

    Docker & Kubernetes : Helm chart repository with Github pages

    Docker & Kubernetes : Deploying WordPress and MariaDB with Ingress to Minikube using Helm Chart

    Docker & Kubernetes : Deploying WordPress and MariaDB to AWS using Helm 2 Chart

    Docker & Kubernetes : Deploying WordPress and MariaDB to AWS using Helm 3 Chart

    Docker & Kubernetes : Helm Chart for Node/Express and MySQL with Ingress

    Docker & Kubernetes : Docker_Helm_Chart_Node_Expess_MySQL_Ingress.php

    Docker & Kubernetes: Deploy Prometheus and Grafana using Helm and Prometheus Operator - Monitoring Kubernetes node resources out of the box

    Docker & Kubernetes : Deploy Prometheus and Grafana using kube-prometheus-stack Helm Chart

    Docker & Kubernetes : Istio (service mesh) sidecar proxy on GCP Kubernetes

    Docker & Kubernetes : Istio on EKS

    Docker & Kubernetes : Istio on Minikube with AWS EC2 for Bookinfo Application

    Docker & Kubernetes : Deploying .NET Core app to Kubernetes Engine and configuring its traffic managed by Istio (Part I)

    Docker & Kubernetes : Deploying .NET Core app to Kubernetes Engine and configuring its traffic managed by Istio (Part II - Prometheus, Grafana, pin a service, split traffic, and inject faults)

    Docker & Kubernetes : Helm Package Manager with MySQL on GCP Kubernetes Engine

    Docker & Kubernetes : Deploying Memcached on Kubernetes Engine

    Docker & Kubernetes : EKS Control Plane (API server) Metrics with Prometheus

    Docker & Kubernetes : Spinnaker on EKS with Halyard

    Docker & Kubernetes : Continuous Delivery Pipelines with Spinnaker and Kubernetes Engine

    Docker & Kubernetes: Multi-node Local Kubernetes cluster - Kubeadm-dind(docker-in-docker)

    Docker & Kubernetes: Multi-node Local Kubernetes cluster - Kubeadm-kind(k8s-in-docker)

    Docker & Kubernetes : nodeSelector, nodeAffinity, taints/tolerations, pod affinity and anti-affinity - Assigning Pods to Nodes

    Docker & Kubernetes : Jenkins-X on EKS

    Docker & Kubernetes : ArgoCD App of Apps with Heml on Kubernetes

    Docker & Kubernetes : ArgoCD on Kubernetes cluster

    Docker & Kubernetes : GitOps with ArgoCD for Continuous Delivery to Kubernetes clusters (minikube) - guestbook










    Contact

    BogoToBogo
    contactus@bogotobogo.com

    Follow Bogotobogo

    About Us

    contactus@bogotobogo.com

    YouTubeMy YouTube channel
    Pacific Ave, San Francisco, CA 94115

    Pacific Ave, San Francisco, CA 94115

    Copyright © 2024, bogotobogo
    Design: Web Master