Your Choice JavaScript News

100daysofcode, node, chat, nodejs & much more…

Node News Thursday, May 31

How to setup CI/CD workflow for Node.js apps with Jenkins and Kubernetes

  • Basically it includes implementing development and integration workflows where developers commit their changes to the central repository frequently, ensuring that their commits are functional and ready to be deployed to production.
  • In this tutorial I will explain how to set up a CI/CD workflow of a Node.js application hosted on Kubernetes.
  • The src directory contains a basic Node.js application which creates an http server on port 8080 and returns a message depending on the visited path: – – Tests directory contains two scripts with tests to perform in order to ensure that the application is up and running.
  • The workflow consists of three stages: – – So this is the Jenkinsfile: – – In order to install Jenkins we will use the Helm chart available on the official stable repository.
  • Notice that the URL you have to indicate in Bitbucket is our case it is: – – I have demonstrated a simple CI/CD workflow with Jenkins and Kubernetes.

Tags:

How to setup CI/CD workflow for Node.js apps with Jenkins and Kubernetes

Build a Simple GraphQL Server with GraphQL Yoga

  • After importing GraphQL server, I can go ahead and create an instance of this server, which takes a configuration object and receives the type definitions, as well as the resolvers.
  • We need a type, computer, and it has a property module, which is of string type, a property maker, which is also a string, and then the year it was manufactured, which can be an integer.
  • So far, we have the module, the maker, and the year fields in the computer type.
  • You can also see that we have the query type, which returns an array of computers.
  • Whenever I will send a query to the server, the GraphQL SRI receives this query, validates it against the type definitions, and then uses the resolvers to send the payload back to the client.

Tags:

Build a Simple GraphQL Server with GraphQL Yoga

Simple chat application in node.js

Tags:

Simple chat application in node.js

Top Node Courses

The Complete Node.js Developer Course (2nd Edition) (60,232 students enrolled)

By Andrew Mead
  • Build, test, and launch Node apps
  • Create Express web servers and APIs
  • Store data with Mongoose and MongoDB
  • Use cutting-edge ES6/ES7 JavaScript
  • Deploy your Node apps to production
  • Create real-time web apps with SocketIO

Learn more.


Angular (Angular 2+) & NodeJS - The MEAN Stack Guide (26,806 students enrolled)

By Maximilian Schwarzmüller
  • Build real Angular + NodeJS applications
  • Understand how Angular works and how it interacts with Backends
  • Connect any Angular Frontend with a NodeJS Backend
  • Use MongoDB with Mongoose to interact with Data on the Backend
  • Use ExpressJS as a NodeJS Framework
  • Provide a great user experience by using Optimistic Updating on the Frontend
  • Improve any Angular (+ NodeJS) application by adding Error Handling

Learn more.