javascript - Node.js File Security -


i'm start creating website takes values of form inputs(dropdowns, radial boxes, etc.) client(no user accounts involved) , performs calculations besed off of these values. these calculations rather sensitive , know client side javascript can't made secure.

is possible pull these client side values , run calculations server side node.js? if so, how secure that? other precautions can taken? if that's not possible or secure, alternative solutions?

you have couple options sending data server , performing calculations there.

  1. you can put data form , can submit form server. server receive data form , can whatever wants data. server can return new page whatever results want show , browser show results page.

  2. you can collect data web page , send server ajax call made via javascript. server receive data ajax call , can whatever calculations wants data. can return whatever data appropriate ajax call , client receive data in javascript , can display in new page (or whatever else appropriate).

code make calculations on server safe security on own server (which can made plenty secure). server-based code not available outside world.

if concerned security of data or result in transit, can use https between webpage , server.


when ask "security", folks can provide better answers/info if more you're trying protect, why you're trying protect , types of threats you're trying protect from. security best designed , implemented specific reasons , haven't provided of type of specifics.