Tuesday 23 May 2017

a sub server inside a main node server

How to create sub-servers inside a node.js main server?

  const App =express();
    const port=3030;
    const Item = require('./script/DBConnector')
    app.use(express.static(__dirname));
    app.use(bodyParser.json());
            app.listen(port,(err)=>{
            if(err){
                console.log(err);
                return;
            }
            console.log('Server is running on port :'+ port)
        });



via Yasitha Anuranga Hettiarachchi

No comments:

Post a Comment