How to make Jenkins build NodeJS, Ruby, and Maven on Docker

How To Make Jenkins Build #NodeJS, #Ruby, And #Maven On #Docker  #reactjs #devops

  • Jenkins can speed up repetitive tasks that robots are much better performing and Docker simplifies spinning up VM’s for your application in a very simple and repeatable way.
  • What I’m going to cover here is how to setup your Jenkins server in a Docker container and how to fix some of the limits of the Jenkins official image.
  • While it is nice of Jenkins to offer an official docker image, you’ll quickly run into a few issues if you are doing anything even slightly other than compiling plain Java.
  • For instance, Maven, the popular dependency management tool for Java, is not included in the Docker container.
  • You’ve learned to create a Jenkins Docker-container that’s ready to run jobs for Java, Ruby and NodeJS projects.

Setup your Jenkins server in a Docker container and fix some of the limits of the official image I discovered so you can get up and building faster.
Continue reading “How to make Jenkins build NodeJS, Ruby, and Maven on Docker”

JavaScript ES 2017: Learn Async/Await by Example – codeburst

  • Consider the below code:function doubleAfter2Seconds(x) { return new Promise(resolve = { setTimeout(() = { resolve(x * 2); }, 2000); });}In this code we have a function called doubleAfter2Seconds.
  • Here’s what the boilerplate code looks like:function addPromise(x){ return new Promise(resolve = { // Code goes here… // resolve() });}Awesome.
  • In this example we should be returning x + 2*a + 2*b + 2*c. Here’s the code:function addPromise(x){ return new Promise(resolve = { = { = { = { resolve(x + a + b + c); }) }) }) });}Lets walk through the code again, line by line.First, we create…
  • Here’s what that looks like:async function addAsync(x) { // code here…}Now that you’ve created an async function, we can make use of the await keyword which will pause our code until the Promise has resolved.
  • Here’s how easy that is:async function addAsync(x) { const a = await doubleAfter2Seconds(10); const b = await doubleAfter2Seconds(20); const c = await doubleAfter2Seconds(30); return x + a + b + c;}And here’s the full code:As you can see, we’re still making use of the same doubleAfter2Seconds function.

ES 2017 introduced Asynchronous functions. Async functions are essentially a cleaner way to work with asynchronous code in JavaScript. In order to understand exactly what these are, and how they work…
Continue reading “JavaScript ES 2017: Learn Async/Await by Example – codeburst”

Deploy a React App on Cosmic JS in 3 Easy Steps – Hacker Noon

Deploy a React App on Cosmic JS in 3 Easy Steps – Hacker Noon  #ReactJS #javascript

  • Deploy a React App on Cosmic JS in 3 Easy StepsIn this blog I will demonstrate how to Install and Deploy a React | Redux | Node.js application onto Cosmic JS.
  • Cosmic JS is an API-first CMS that makes managing and building websites and applications faster and more intuitive.
  • To read more about how Cosmic JS was built with editing content in mind, read Building With the Content Editor in Mind.It’s as easy as signing up, creating a new bucket, installing the web application(s), edit objects and deploy!
  • I get my confirmation email to access my web application and also see my options for bucket upgrades like custom domains, one-click SSL, webhooks and localization.Cosmic JS is an API-first cloud-based content management platform that makes it easy to manage applications and content.
  • If you have questions about the Cosmic JS API, please reach out to the founders on Twitter or Slack.Carson Gibbons is the Co-Founder CMO of Cosmic JS, an API-first Cloud-based Content Management Platform that decouples content from code, allowing devs to build slick apps and websites in any programming language…

In this blog I will demonstrate how to Install and Deploy a React | Redux | Node.js application onto Cosmic JS. The app is a simple ToDo App that consumes the Cosmic JS CMS API. I’ll be using Cosmic…
Continue reading “Deploy a React App on Cosmic JS in 3 Easy Steps – Hacker Noon”

5 JavaScript Style Guides — Including AirBnB, GitHub, & Google

  • 5 JavaScript Style Guides — Including AirBnB, GitHub,  GoogleLearn to code like a GooglerWhether you’re just starting to learn JavaScript, or getting ready for your big interview with AirBnB, here are 5 style guides that can help you write cleaner code.What the heck is a style guide?A style guide is a set of standards…
  • As you read through these guides, you can get an idea for how code is written at the respective companies.Why do we need style guides?For one main reason: Everyone writes code differently.
  • That’s all fine and dandy as long as we each work on our code.
  • But what happens when you have 10, 100, or even 1,000 developers all working on the same codebase?
  • Style guides are created so new developers can get up to speed on a code base quickly, and then write code that other developers can understand quickly and easily!

Whether you’re just starting to learn JavaScript, or getting ready for your big interview with AirBnB, here are 5 style guides that can help you write cleaner code. A style guide is a set of…
Continue reading “5 JavaScript Style Guides — Including AirBnB, GitHub, & Google”

How to make Jenkins build NodeJS, Ruby, and Maven on Docker

How To Make Jenkins Build #NodeJS, #Ruby, And #Maven On #Docker  #reactjs #devops

  • Jenkins can speed up repetitive tasks that robots are much better performing and Docker simplifies spinning up VM’s for your application in a very simple and repeatable way.
  • What I’m going to cover here is how to setup your Jenkins server in a Docker container and how to fix some of the limits of the Jenkins official image.
  • While it is nice of Jenkins to offer an official docker image, you’ll quickly run into a few issues if you are doing anything even slightly other than compiling plain Java.
  • For instance, Maven, the popular dependency management tool for Java, is not included in the Docker container.
  • You’ve learned to create a Jenkins Docker-container that’s ready to run jobs for Java, Ruby and NodeJS projects.

Setup your Jenkins server in a Docker container and fix some of the limits of the official image I discovered so you can get up and building faster.
Continue reading “How to make Jenkins build NodeJS, Ruby, and Maven on Docker”

How to do end-to-end testing on React Native with Detox

  • They are being performed on matched elements.Expect verifies if a certain value is as expected to be.As we can see detox covers a lot of possible user interactions that can be automated.Make our tests more readableTo be honest, we can do much better.First let’s get rid of the duplication for matchers…
  • Automate the process and land on the moon 🚀Once we reached a certain amount of tests, we thought it could be nice to automate the process and think in terms of “continuous testing”.
  • That’s why we decided to run the end-to-end test on our build server.Every new pull request that comes in, triggers unit tests with Jest on CircleCI and now also our end-to-end tests on Bitrise (our build server).
  • This is mostly due to the Detox build scripts.AlternativesWe also considered others libraries such as:Appium which is a cross platform test library where tests can be written in many languages (node, ruby, java, … ).
  • Hence, our choice of using Detox.ConclusionIn this article we saw how to handle Detox and its API, how to automate everything with Bitrise (or any CI that can runs an IOS Simulator).

When we started writing our React-Native app at Home, testing was something we took seriously from day one. While it was easy to setup a proper unit-tests workflow with Jest and Typescript, we figure…
Continue reading “How to do end-to-end testing on React Native with Detox”

Facebook Relents on React.js License Issue via @InfoSecHotSpot

Facebook Relents on React.js License Issue  via @InfoSecHotSpot

  • Well, it’s safe to use code from Facebook’s React.js library in open source projects.
  • At issue is a license Facebook created by taking an existing open source license, modifying it with a short patent caveat, then calling it the BSD+Patents license.
  • The issue was with the patent clause Facebook had added to the license, which states that anyone using the code, directly or indirectly, cannot take legal action against Facebook for any patent infringement involving any software without losing the right to use and distribute the code.
  • The problem wasn’t with patent protections: Many open source licenses, including Apache, have patent clauses preventing users from suing over any patents the covered software might infringe, but Facebook’s license seeks to protect the company from infringement by any and all of its software.
  • Then on Friday, Facebook’s engineering director, Adam Wolff, announced in a blog post, “Next week, we are going to relicense our open source projects React, Jest, Flow, and Immutable.js under the MIT license.

It’s safe to go back in the water again. Well, it’s safe to use code from Facebook’s React.js library in open source projects. The folks at the social site have done an about-face and will be changing React.js’s license to MIT, along with the licenses for Jest, Flow and Immutable.js. The announcement came exactly a month after we reported on a licensing brouhaha that had resulted in a standoff between Facebook and the Apache Foundation.
Continue reading “Facebook Relents on React.js License Issue via @InfoSecHotSpot”