Transport javascript into cmd.
deploy a module with scp.
Copy files to remote server
build the standard cmd module