disabling Devise registration for production environment only

Edit the user model and remove :registerable, I think that should give you what you want. Edit: I think this would work: if Rails.env.production? devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable else devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable, :registerable end

Deploying a production Node.js server [closed]

You should really really use a framework (I recommend something like Express since it was battle-tested) unless you want to deal with sessions, cookies, middleware etc by yourself. Express is really light. Starting the server with nohup: you shouldn’t do that, just start it with the regular “node” command. Also Express wraps the routes in … Read more

Performance impact of using css / javascript source-maps in production?

A quick test using Charles Web Proxy shows that source maps are only loaded if developer tools are opened. If you load a page without dev tools opened, there is no http request for source maps. The behaviour was the same in Chrome 43 and Firefox 38. So it appears they would be no impact … Read more

SQLite as a production database for a low-traffic site?

SQLite doesn’t support any kind of concurrency, so you may have problems running it on a production website. If you’re looking for a ‘lighter’ database, perhaps consider trying a contemporary object-document store like CouchDB. By all means, continue to develop against SQLite, and you’re probably fine to use it initially. If you find your application … Read more

What is the difference between production and development mode in Angular2?

In development mode, change detection does a second run immediately after the first run and produces an error if any bound value has changed between the first and the second run. This helps to locate bugs where checking values has side-effects or fields or functions don’t return the same value on subsequent calls which undermines … Read more

How to configure MongoDB Java driver MongoOptions for production use?

Updated to 2.9 : autoConnectRetry simply means the driver will automatically attempt to reconnect to the server(s) after unexpected disconnects. In production environments you usually want this set to true. connectionsPerHost are the amount of physical connections a single Mongo instance (it’s singleton so you usually have one per application) can establish to a mongod/mongos … Read more

Webrick as production server vs. Thin or Unicorn?

A couple important reasons it’s written in Ruby (see http://github.com/ruby/ruby/tree/trunk/lib/webrick) Edited it doesn’t have many features that a production website usually needs, like multiple workers (in particular, pre-forking, life cycle management, asynchronous handling, etc), redirects, rewriting, etc When I mention redirects/rewrites, I’m referring to the fact that using Webrick, you have to handle rewrites at … Read more

Canary release strategy vs. Blue/Green

I have written a detailed essay on this topic here: http://blog.itaysk.com/2017/11/20/deployment-strategies-defined In my opinion, the difference is whether or not the new ‘green’ version is exposed to real users. If it is, then I’d call it Canary. A common way to implement Canary is regular Blue/Green with the addition of smart routing of specific users … Read more

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