Angular 2 with CLI – build for production

Updated for Angular v6+ # Prod – these are equivalent ng build –configuration=production ng build –c=production ng build –prod=true # Dev – and so are these ng build –configuration=development ng build –c=development ng build –prod=false ng build More flag settings here https://angular.io/cli/build Per Angular-cli’s github wiki v2+, these are the most common ways to initiate … Read more

Staging database good practices

By bypassing staging and making changes in production is a recipe for disaster and disuse. As you make those changes the definition of minor begins to change. Secondly as the two environments depart (i.e. staging no longer matches production) things break and you lose confidence in the staging environment. To get the most from a … Read more

Should I remove e.printStackTrace() from my code before publishing

You shouldn’t be using e.printStackTrace() directly anyway — doing so will send the info to the Android log without displaying which application (log tag) it came from. As others have mentioned, continue to catch the Exception in question, but use one of the android.util.Log methods to do the logging. You could log only the message, … Read more

Accessing Meteor production database

You should use meteor mongo http://blah.meteor.com; or even shorter meteor mongo blah.meteor.com. For documentation you can run meteor help mongo. Extract from running the help command above: Instead of opening a shell, specifying –url (-U) will return a URL suitable for an external program to connect to the database. For remote databases on deployed applications, … Read more

Logging in Ruby on Rails in Production Mode

The normal log level in production is info, so debug logs are not shown. Change your logging to Rails.logger.info “Year: #{Time.now.year}” to show it in production.log. Alternatively (but not a good idea) you can raise the logging level in /config/environments/production.rb: config.log_level = :debug Update Rails 4.2: Now the default debug level in all environments is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)