Skip to content

Angular Fullstack on Windows IIS

Running NodeJS on an IIS server is a challenge on it’s own. Configuring it to work correctly with your angular fullstack project generated with YeoMan is an additional challenge. Below you can find a gist that should get you started with your web.config which is needed to run NodeJS under IIS.

https://gist.github.com/ThomasHambach/20c49b5b0c325ab4fef9

1 Comment

Node ODBC MSSQL Last Insert ID

Breaking your head over how to get the last insert id using node and ODBC for MSSQL? So was I. If you perform an insert query such as:

db.query('INSERT INTO Users (name) VALUES ("Jane Doe");

Followed by

db.query('SELECT SCOPE_IDENTITY()');

You will be out of scope and get a nice NULL object in your callback. The solution is to perform both queries in once call.

db.query('INSERT INTO Users (name) VALUES ("Jane Doe"); SELECT SCOPE_IDENTITY() as lastInsertId');

Leave a Comment

React cannot find module copyProperties

Error: Cannot find module 'react/lib/copyProperties'

Having a headache with this one? Well, so was copyProperties has been removed and replaced by objectAssign.

So instead of this
var copyProperties = require('react/lib/copyProperties');

You want to do this
var objectAssign = require('react/lib/Object.assign');

Implementation does not change. Luckily.

1 Comment

NoMethodError: undefined method `spatial’ using rgeo and activerecord-mysql2spatial-adapter

Are you experiencing the error below? Well, so was I. It appears that the schema.rb is not correctly generated and you will have to change that manually.

NoMethodError: undefined method `spatial’ for #
/home/rails/vendor/bundle/ruby/2.1.0/gems/rgeo-activerecord-0.4.6/lib/rgeo/active_record/common_adapter_elements.rb:105:in `method_missing’

Look in your schema.rb and find a line similar to
t.spatial "latlon", limit: {:type=>"point"}

Change it to
t.column "latlon", :point, null: false

Leave a Comment