aesalazar / NodeMockServers

Mock Servers in NodeJs For Blog Post

Home Page:http://www.eikospartners.com/blog/how-to-mock-web-servers-using-node.js-part-1-http

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mocking Web Servers with Node.js

Source code for blog posts "How to mock web servers using Node.js" parts 1 and 2 which can be found here:

This was built in Visual Studios 2015 using the Node.js extension but it can be ran like any other node project. Remember to run

npm install

to get needed dependencies and then

npm start

to start the servers.

Once started, it will make available two separate servers - one for HTTP and the other for websockets. They will be listening on the following ports:

//Ports
var httpPort = 8888;
var wsPort = 8889;

They can be tested using the included ClientWebSocket.html file in a browser.

About

Mock Servers in NodeJs For Blog Post

http://www.eikospartners.com/blog/how-to-mock-web-servers-using-node.js-part-1-http


Languages

Language:JavaScript 56.0%Language:HTML 44.0%