Kindly enlighten me of where should I really develop the code's written on this site.
I've been seeing the codes written on the web but I dont know where should I put these codes. This is my first time studying the strongloop loopback. I've been searching on some tutorial but they don't seem to tell where to put those codes.
im planning to connect to mysql on my server
Depending on your requirements, there could be a few steps involved.
Run 'slc lb project' to scaffold a Node.js application
Add models and configure the datasource. LoopBack automatically creates CRUD methods for you and expose them as REST APIs.
You can drop in code into models folder to customize the model, for example:
var app = require('../app'); var MyModel = app.models.MyModel; // From models.json MyModel.newMethod = function() { ... }; MyModel.prototype.anotherMethod = function() { ... };
You can find an example at: https://github.com/strongloop-community/loopback-example-database