concept production in category node

This is an excerpt from Manning's book Get Programming with Node.js.
In this section, you set up Git and the Heroku command-line interface (CLI), which you’ll use at the end of the book to deploy your applications online. Deployment is a term used to describe the migration of your application from your computer to a place where it can be accessed and used publicly online. Software configuration management (SCM) is the process of managing your application in its different environments as new features and changes are applied to the code. You can use Git and the Heroku CLI together to deploy your code from development to production and manage your application.
It’s time to move my application to production. I’ve coordinated with Confetti Cuisine on original expectations and feature changes along the way. The result is a Node.js application running with Express.js, MongoDB, and a variety of packages to connect users with the Confetti Cuisine cooking school. I’ve had multiple opportunities to deploy this application without a database or the ability to save meaningful data. Now that I’ve cleaned up my code and written a few tests, I turn to Heroku to demo the effect of my application on the world.
Although the steps are short and don’t involve much more coding, I want to be careful not to make any mistakes in the deployment process. Troubleshooting in development is a lot simpler than in production.
I start by verifying that Heroku CLI and Git are installed on my machine. Running heroku --version and git --version in terminal should let me know whether they’re installed and what versions they are. I need Heroku to allow the server’s port to use an environmental variable in production, not just port 3000. I’ll make sure in main.js that my port is set by app.set("port", process.env.PORT || 3000). The port number will initially be assigned to the port number at process.env.PORT if such a value exists. Otherwise, the port will default to 3000.

This is an excerpt from Manning's book Getting MEAN with Mongo, Express, Angular, and Node.js 2ED.
Environment variables affect the way the core process runs, and the one you’ll look at and use here is NODE_ENV. The application already uses NODE_ENV; you don’t see it exposed anywhere. By default, Heroku should set NODE_ENV to production so that the application will run in production mode on its server.
So far, you’ve been working with Angular in development mode while building your little application. But as soon as you stop ng serve from running, all you’re left with is a bunch of source files, nothing you could include in a website. What you need to do now is build your application for production and add it to your homepage.

This is an excerpt from Manning's book Isomorphic Web Applications: Universal Development with React.
devDependencies includes build tools such as Babel and webpack. Packages in the devDependencies section of package.json don’t get installed when the NODE_ENV variable is set to production. See table 2.1 for additional information.
The JavaScript ecosystem provides many great libraries and tools to make writing applications faster and easier for developers. To take advantage of them, you need to have tooling in place that can compile, transform, and prepare your code for production. Enter webpack, a build tool that’s entirely configuration driven.
I’m going to be completely honest with you: webpack isn’t an intuitive tool. I found it frustrating to work with at first. But it’s extremely powerful and worth learning. Webpack gives you the ability to include any JavaScript code in your build, even libraries that haven’t been set up to run in the browser (for example, npm packages). It also can take care of many other build steps, including compiling your code with Babel and preparing your code for production. This chapter covers all the basics you need in order to have a good workflow in your isomorphic project.
In order to end up with production output, you will use some additional plugins to prepare the code. The following listing shows how to create a webpack configuration file that is ready for production.
Listing 5.15. Production build—config/prod.config.js
var baseConfig = require('./base.config.js'); var webpack = require('webpack'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var injectEnvironment = new webpack.DefinePlugin({ __ENV__: JSON.stringify("prod") #1 }); module.exports = Object.assign(baseConfig, { output: { filename: 'prod-bundle.js' #2 }, plugins: [ new webpack.optimize.UglifyJsPlugin({ #3 compress: { warnings: false, drop_console: true } }), new HtmlWebpackPlugin({ title: "Calendar App", filename: 'prod-bundle.html' #4 }) injectEnvironment ] }); #1 Inject prod environment variable. #2 Change bundle name for current environment. #3 Uglify your code—this both compresses and uglifies the code. #4 Change filename of outputted HTML file. !@%STYLE%@! {"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":5,\"ch\":60},{\"line\":5,\"ch\":62}],[{\"line\":26,\"ch\":0},{\"line\":26,\"ch\":2}],[{\"line\":9,\"ch\":60},{\"line\":9,\"ch\":62}],[{\"line\":27,\"ch\":0},{\"line\":27,\"ch\":2}],[{\"line\":12,\"ch\":60},{\"line\":12,\"ch\":62}],[{\"line\":28,\"ch\":0},{\"line\":28,\"ch\":2}],[{\"line\":20,\"ch\":60},{\"line\":20,\"ch\":62}],[{\"line\":29,\"ch\":0},{\"line\":29,\"ch\":2}]]"} !@%STYLE%@!Plugins have many use cases and can help you with everything from configuration to uglifying your output. For this reason, several plugins ship with webpack that can help you prepare your build for production. In addition to the plugins shown in the preceding listing, you can read about other webpack plugins on the webpack site (https://webpack.js.org/configuration/plugins/) and the npm site (www.npmjs.com/search?q=webpack+plugin). As of the latest version of webpack, deduping module includes and occurrence ordering are default behaviors.

This is an excerpt from Manning's book hapi.js in Action.
During Black Friday 2013, the Walmart Labs team shared their experiences with using Node in production with the world using the Twitter hashtag #nodebf. The team posted samples of code showing how parts of their infrastructure were put together. Some tweets showed graphs of flat lines for memory and CPU consumption throughout the day. These tweets caught the attention of everyone interested in learning how production-ready Node was for enterprise-scale applications.

This is an excerpt from Manning's book Node.js in Practice.
This technique outlines how to use Node with PaaS providers, and has tips on how to configure and maintain applications in production. The focus is on the practical aspects of deployment and maintenance, rather than pricing or business models.