npm run setenv sets target endpoint server

@alex-deaconu please review
@EnlightenedCode fyi