Your Choice JavaScript News

Node News Saturday, February 10

Node News TLDR / Table of Contents

  • rage8885/OpenSC2K
    • OpenSC2K – An Open Source remake of Sim City 2000 by Maxis
    • GNU General Public, General Public License, file open prompt, Open Source remake, Open Source SimCity
  • An Exhaustive Guide to Writing Dockerfiles for Node.js Web Apps
    • Step by step guide to writing highly optimized Dockerfiles for Node.js web app development and deployment. Covers adding hot reloading, serving static files and using multi-stage alpine builds.
    • docker, Node.js Docker Best, nginx docker, node express server,
  • Seven Reasons to Choose Node.js for Your Startup | DA-14
    • JavaScript is justly called the most popular programming language several years in a row, as it is a common software development technology among both startups and well-established enterprises. Initially employed for front-end development, it has quickly become one of the major tools for back-end and even cross-platform mobile app development….
    • node js, node package manager, Node JS advantages, default Node package,
  • Node.js Garbage Collection Explained | @RisingStack
    • Learn how Node.js garbage collection and memory management works in practice. Code-level explanation and garbage collection examples inside.
    • garbage collector, garbage collection, memory, memory management, Node.js garbage collection
  • Learning Go as a Node.js Developer
    • With Docker and Kubernetes Go got quite some traction – it’s time to learn it!
    • go-to container scheduling, pay particular attention, code snippet, project specific dependencies, official setup guide
  • A Node.js Perspective on MongoDB 3.6: Change Streams
    • Before MongoDB 3.6, tailing the MongoDB oplog was the only way to listen for changes to your MongoDB database. The oplog is a special collection that logs all inserts and updates that come in to your MongoDB server so other members of the replica set can copy them. Tools like…
    • Binary { _bsontype, Axl Rose, oplog, buffer, MongoDB
  • Sharing Variables Between Python & Node.js in Jupyter Notebooks
    • I created the pixiedust_node project to allow Jupyter Notebooks to contain a mixture of Python and Node.js cells. It’s installed with a simple command: Enabling notebooks to mix Node.js and Python is…
    • Node.js cells, Python, Python cells, ,

Score: 1739.5861378553668
URL: https://github.com/rage8885/OpenSC2K
Tweeted At: Sat Feb 10 10:23:00 +0000 2018
Publish Date:
Author: rage8885

  • on the work of Dale Floer – – Based on the work of David Moews – – This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the…
  • You should have received a copy of the GNU General Public License along with this program.
  • These assets are NOT covered by the GNU General Public License used by this project and are copyright EA / Maxis.
  • I’m including these assets in the hope that because the game has been made freely available at various points in time by EA, and because it’s 24 years old as of publishing this project that no action will be taken.
  • Long term, I plan to add functionality to extract assets from the original game files within this project.

Tags: GNU General Public, General Public License, file open prompt, Open Source remake, Open Source SimCity

Score: 155.44358578052547
URL: https://blog.hasura.io/an-exhaustive-guide-to-writing-dockerfiles-for-node-js-web-apps-bbee6bd2f3c4?gi=9cfce34582b3
Tweeted At: Sat Feb 10 12:40:00 +0000 2018
Publish Date: 2018-02-07T13:18:51.883000+00:00
Author: Praveen Durairaj

  • Using nodemon for hot reloading during development.Optimising for Docker cache layers — placing commands in the right order so that npm install is executed only when necessary.Serving static files (bundles generated via React/Vue/Angular) using serve package.Using multi-stage alpine build to reduce final image size for production.
  • Simple Dockerfile ExampleFor the base image, we have used the latest LTS versionnode:carbonDuring image build, docker takes all files in the context directory.
  • If any files change, nodemon will automatically restart your node application.We’ll build the image and run nodemon so that the code is rebuilt whenever there is any change inside the app directory.
  • OptimisationsIn your Dockerfile, prefer COPY over ADD unless you are trying to add auto-extracting tar files, according to Docker’s best practices.Bypass package.json ‘s start command and bake it directly into the image itself.
  • Assuming you are building a UI app using React/Vue/Angular, you would ideally build your final bundle using npm run build which would generate a minified JS and CSS file.The other alternative is to either 1) build the files locally and use an nginx docker to serve these static files or…

Tags: docker, Node.js Docker Best, nginx docker, node express server,

Score: 101.45333173904343
URL: https://da-14.com/blog/seven-reasons-choose-nodejs-your-startup
Tweeted At: Wed Feb 07 16:27:29 +0000 2018
Publish Date:
Author:

  • JavaScript is justly called the most popular programming language several years in a row, as it is a common software development technology among both startups and well-established enterprises.
  • If you are up to building a real-time or streaming web application with multiple concurrent connections (messaging apps, social media, multiplayer games, virtual terminal emulators, etc.) you’ll definitely benefit from Node capabilities, especially in terms of efficient performance and easier development processes.
  • On the top of that, if you have a small team of JavaScript developers and you aren’t looking to hire developers for backend development only, Node js will work well.
  • Considering the above-mentioned use cases, let’s sum up and highlight the top seven benefits of Node.js for startups: – – If you opt for Node.js, you can benefit from the ease of sharing one and the same language both on server and client sides.
  • Npm is a default Node package manager that also works as a huge database for free JavaScript tools, contributed by the community.

Tags: node js, node package manager, Node JS advantages, default Node package,

Score: 91.90713392059237
URL: https://blog.risingstack.com/node-js-at-scale-node-js-garbage-collection/
Tweeted At: Sat Feb 10 01:05:00 +0000 2018
Publish Date: 2016-11-15T07:42:40+00:00
Author: Gergely Nemeth

  • In this article, you are going to learn how Node.js garbage collection works, what happens in the background when you write code and how memory is freed up for you.
  • Managing your memory this way can introduce several major bugs to your applications: – – Luckily for you, Node.js comes with a garbage collector, and you don’t need to manually manage memory allocation.
  • Garbage collection is a way of managing application memory automatically.
  • The job of the garbage collector (GC) is to reclaim memory occupied by unused objects (garbage).
  • Once the garbage collector is run, the objects that are unreachable gets deleted, and the memory space is freed up.

Tags: garbage collector, garbage collection, memory, memory management, Node.js garbage collection

Score: 65.66394443491681
URL: https://nemethgergely.com/learning-go-as-a-nodejs-developer/
Tweeted At: Fri Feb 09 21:08:05 +0000 2018
Publish Date: 2018-02-08T08:00:00+00:00
Author: Gergely Nemeth

  • Go has a C-like syntax: – – To install Go, follow the official setup guide: someone who writes a considerable amount of JavaScript code, one of the first questions I had was how does Go handle dependency management?
  • will create similar files that would – to describe the project, just like in the Node.js ecosystem.
  • Let’s see what happened in the code snippet above line by line: – – The example above works, but reads the files one after each other – time to go asynchronous!
  • Using , we can rewrite the file reading code snippet to run concurrently this way: – – In the Node.js space we have a ton of options when it comes to picking a framework for writing HTTP services – Go is no different.
  • After some searching on Google, I chose Gin to start with.

Tags: go-to container scheduling, pay particular attention, code snippet, project specific dependencies, official setup guide

Score: 63.87036247334754
URL: http://thecodebarbarian.com/a-nodejs-perspective-on-mongodb-36-change-streams.html
Tweeted At: Fri Feb 09 22:42:26 +0000 2018
Publish Date:
Author: Valeri Karpov

  • Change streams are a usability layer on top of the MongoDB oplog that make change detection in MongoDB much easier than tailing the oplog directly.
  • Change streams require a MongoDB replica set.
  • Once you set up a replica set, you will be able to create a change stream using the the method on MongoDB driver collections or Mongoose models.
  • Below is a standalone script that starts up a MongoDB replica set, creates a change stream, and inserts a document to trigger the change stream.
  • Change streams are the most prominent new feature in MongoDB 3.6, but they’re far from the only one.

Tags: Binary { _bsontype, Axl Rose, oplog, buffer, MongoDB

Score: 54.02256232686981
URL: https://medium.com/ibm-watson-data-lab/sharing-variables-between-python-node-js-in-jupyter-notebooks-682a79d4bdd9
Tweeted At: Wed Jan 24 15:54:54 +0000 2018
Publish Date: 2018-01-24T15:46:36.582000+00:00
Author: Glynn Bird

  • Sharing Variables Between Python Node.js in Jupyter NotebooksThey live apart and speak different languages, but these variables hold common valuesI created the pixiedust_node project to allow Jupyter Notebooks to contain a mixture of Python and Node.js cells.
  • pip install pixiedust_nodeimport pixiedust_nodeAfter that, use %%node at the top of cells that are to contain date is”, new Date());Notebooks can use any npm package by using the npm.install Python command:npm.install( (‘request’, ‘request-promise’) )And then using the library in a Node.js cell:%%nodeconst request = notebooks to mix Node.js and Python…
  • With the release of pixiedust_node v0.2 you can now share data interchangeably between Python and Node.js cells.
  • Declare some variables in Python:a = ‘hello’b = 2c = Falsed = {‘x’:1, ‘y’:2}e = 3.142f = [{‘a’:1}, {‘a’:2}, {‘a’:3}]And they will magically appear in your Node.js cells:%%nodeconsole.log(a, b, c, d, e, f);// hello 2 false {y:2, x:1} 3.142 [{ a:1 }, { a:2 }, { a:3 }]Similarly, global variables…
  • You can use Node.js to fetch the data, move it to the Python environment, and convert it into a Pandas or Spark data frame for aggregation, analysis and visualisation.PixieDust and pixiedust_node give you the flexibility to mix and match Python and Node.js code to suit the workflow you are building…

Tags: Node.js cells, Python, Python cells, ,

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.