Twilio and sailsjs?

180 views
Skip to first unread message

Brent Clements

unread,
Jul 22, 2014, 11:09:10 PM7/22/14
to sai...@googlegroups.com
Does anyone have any sample or opensource code that shows how to use sailsjs with twilio?

Looking to transition our php based twilio app to sailsjs/node.

Thanks!

Weyert de Boer

unread,
Jul 23, 2014, 6:48:10 PM7/23/14
to sai...@googlegroups.com
Well, I am currently only using the Messaging REST API for a project. What's your question exactly?

Rob Wormald

unread,
Jul 23, 2014, 7:56:39 PM7/23/14
to Brent Clements, sai...@googlegroups.com
https://www.twilio.com/blog/2013/03/introducing-the-twilio-module-for-node-js.html

Works exactly the same in Sails. You’d probably want to create a new (sails) Service, and then you can use it in your controllers.

If its just to send the occasional SMS or whatever, a service is easy and fast. If you’re going to use a lot of the twilio API, you could potentially write a Sails/Waterline adapter, and then treat an SMS like a standard Model.. so you could use the blueprints and cool stuff like that.

R
Reply all
Reply to author
Forward
0 new messages