API handling now uses Express Resource.