javascript - Unable to open url from nodejs -


i not able open url http://192.xxx.xxx.22:9200 nodejs application. using angularjs front end , nodejs backend. if replace xxx.xxx.xxx.xxx localhost able see content of http://192.xxx.xxx.22:9200. here pasting code. here app.js

var express = require('express'); var app = express(); var http = require('http').server(app);  .....  app.post('/home',function(req,res){  }); http.listen(8082,'0.0.0.0',function(){     console.log('listening on 8082'); }) 

my home.html page.

 <div ng-controller="ctrl" class="row">              <div class="col-sm-3">              <div class="sidebar">                       <div ui-view='sidebar'></div>               </div>           </div>               <div class="col-sm-9">               <div class="first_div">                       <label>enter url : <input type="text" ng-model="url"/></label><br />                       <div class='myiframe' >                               <iframe width="900" height="400" ng-src="{{trustedurl()}}"></iframe>                       </div>               </div>           </div>       </div> 

here angular_code.js.

'use strict';  var app = angular.module('app',['ui.router','ui.bootstrap','nganimate'])          .controller('ctrl',function($scope,$http,$rootscope,$location,$sce){  $scope.trustedurl = function ()  {    return $sce.trustasresourceurl($scope.url);  }; 

can 1 me solve problem. need proxy url?

in app.js specifying port 8082, in url 9200. try correct port http://192.xxx.xxx.22:8082


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -