Dev Tutorial #1: Email App

Random question on the Tutorial (also thought we should have an open thread about it, so I’m making one):

On Ubuntu 14.04, when I type “node -v” it returns nothing, as if I didn’t type a command at all. It only works when I do “nodejs -v” (v0.10.25). Just a small strange thing, been wondering if I installed things correctly.

Love the tutorials! They are in a great format also

This is correct because to avoid clash with another package, Ubuntu node is called nodejs. To save hassle I have node aliased to nodejs in my .bashrc.

2 Likes

Thanks, it’s the little things :slight_smile:

I have been playing with the mail tutorial, now I have a working reply button that triggers mail composing, fills the “to” and “subject” for you, and sets the focus in the text field :

https://github.com/wrnice/safe_examples/tree/master/email_app

While it looks nice and all, I wonder if my implementation is really that safe, as I am using query strings to pass the fields values between pages:

<button className="mdl-button mdl-js-button mdl-button--icon"  name="reply" >
<Link id="new_mail" to={"/compose_mail?replyTo="+mail.from+"&replySub="+mail.subject} ><i className="material-icons" data-index={i}>reply</i></Link></button>	

Could this be read from outside when the page is called ? This goes out in plaintext, doesn’t it ?

The question arose when I wondered how to pass the text body so that it is pre written at the bottom of the reply that you are about to write ( you know with > at the begining of lines )

I have been thinking that it may be quite too long and hard to parse as a query string, and mainly that it may expose the precious private content to someone who would monitor the traffic on the machine.

It may be more secure to just pass a reference to the mail ( still need to understand which ) , and have mail_compose fetch the values again from Safe ( this would also put me to actually learn Safe instead of node.js :wink: ). But then it would use bandwidth and ressources from the network to fetch something we already have locally.

Maybe there is a way to transmit this content securely and locally from a page to another that I don’t know of ?

EDIT - looking into global.stuff , seems to be one way

2 Likes