Source language: Translate to:

JavaScript and Node.js

General questions about NeoBook

Moderator: Neosoft Support

JavaScript and Node.js

Postby TMcD » Thu Mar 16, 2017 12:48 am

So, I've only used JavaScript that someone has provided for me, but I'm starting to learn it (not to difficult to start)...

Since we can use JavaScript to do many things, it's really like Node.js, right? Meaning that it can be used to do stuff other than browser stuff.

If my thinking is right, how can we connect twilio to NeoBook, to send SMS messages?

https://www.twilio.com/blog/2016/04/send-text-in-javascript-node-in-30-seconds.html
TMcD
 
Posts: 237
Joined: Sun Apr 10, 2005 11:20 am

Re: JavaScript and Node.js

Postby Gaev » Thu Mar 16, 2017 5:21 am

TMcD:

So, I've only used JavaScript that someone has provided for me, but I'm starting to learn it (not to difficult to start)...
Since we can use JavaScript to do many things, it's really like Node.js, right? Meaning that it can be used to do stuff other than browser stuff.

Node.js is a server side platform that can interpret/service commands written in Javascript. While Javascript is easy (at least the basic and intermediate stuff), Node.js is not for the faint of heart.

In my opinion, it is unnecessarily complicated (and getting worse by the year) ... made by gurus ... for use by other gurus ... sacrifices ease of use for shortcut methods of coding ... even people familiar with PHP etc. have difficulty getting their headsaround the pecularities of Node.js ... too bad, because it is the only Javascript platform on the server side.

Installing Node.js on a Windows machine is also a pain.

If my thinking is right, how can we connect twilio to NeoBook, to send SMS messages?
https://www.twilio.com/blog/2016/04/sen ... conds.html

Those instructions are for use on a server ... notice the command ...
Code: Select all
// Find your account sid and auth token in your Twilio account Console.
var client = twilio('TWILIO_ACCOUNT_SID', 'TWILIO_AUTH_TOKEN');

... defines your account name/password ... if you expose this on the client side, anyone can then use it outside your application ... and you would be charged for that use !!!
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: JavaScript and Node.js

Postby TMcD » Fri Mar 17, 2017 12:58 pm

Thanks Gaev,

I didn't know that Node.js was only server side. I thought it could be run locally as well.
TMcD
 
Posts: 237
Joined: Sun Apr 10, 2005 11:20 am

Re: JavaScript and Node.js

Postby Gaev » Fri Mar 17, 2017 2:13 pm

TMcD:

I thought it could be run locally as well.

It can be run on your local machine ... but you have to set it up as a server (not a simple process as it was designed with the Linux OS in mind) ... same as you can run PHP or Ruby on your windows machine if you first install a local server (address http://127.0.0.1).

If you take a look at the Node (npm) installation instructions (for a Windows machine) e.g. here ... https://nodesource.com/blog/installing- ... l-windows/ ... you will see the level of technical difficulty.
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: JavaScript and Node.js

Postby HPW » Sat Mar 18, 2017 12:00 am

Hello,

Offtopic: Ruby can be used locally by embedding the ruby-dll. ;-)

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2521
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests

cron