I'm new to strongloop and look at documentation and samples but never see my problem as desired. I'v two models, sentence.js and log.js and making post request a sentence from mobile app to rest-api, for example
Model sentence.js (dont want save to db this model, only for parsing and creating log model)
{
name: 'sentence',
type: 'string'
}
Model log.js
{ name: 'lat', type: 'string' },
{ name: 'lng', type: 'string' }
[HTTP POST] myserver/api/sentence?d=$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A
A model has triggered methods, e.g, afterInitialize, beforeValidate , beforeSave. Now, which triggered method or any other scope correct and best for parsing sentence model and creating log model ?
Thanks !