0

Can I block viewing the backbone.js app code viewing in Inspect element -> sources?

I'm not taking about view Html and css, I'm talking about the Backbone view files, which holds model data. Code is deployed in heroku, Is there any addons to block viewing code in heroku?

or any additional secure js, that i need to include to block it?

Thanks, Viji

Viji
  • 2,629
  • 1
  • 18
  • 30

1 Answers1

0

You could minimize, obfuscate, uglify the code, but it's client side, so it's going to be visible. This is also true of any application someone is running on their client, whether it be a native app or on the web.

as far as i know, those processes have to be done during build, before deployment. just rebuild and uglify your code (i use grunt for this, but you can use any tool. Here's a link to an npm library that seems pretty popular for it npmjs.org/package/uglify-js

you just need to install node.js so you have access to npm command from command line, you dont actually need to be using node.js, though there may be a tool for rails, im not familiar with it

Viji
  • 2,629
  • 1
  • 18
  • 30
frajk
  • 853
  • 6
  • 14
  • Is there any heroku addon that will do this process while deployment? – Viji Oct 15 '14 at 23:21
  • 1
    as far as i know, those processes have to be done during build, before deployment. just rebuild and uglify your code (i use grunt for this, but you can use any tool. Here's a link to an npm library that seems pretty popular for it https://www.npmjs.org/package/uglify-js – frajk Oct 15 '14 at 23:28
  • Thanks for recommending , its for the node.js. But, I'm using Rails as backend server functionality code. – Viji Oct 15 '14 at 23:33
  • 1
    you just need to install node.js so you have access to npm command from command line, you dont actually need to be using node.js, though there may be a tool for rails, im not familiar with it – frajk Oct 15 '14 at 23:35
  • 1
    Oh! thats great. I'll keep exploring other options too. Thanks – Viji Oct 15 '14 at 23:35