2.0.0 • Published 7 years ago

node-interface v2.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

node-interface

NPM
Package Quality Build Status npm (tag) Packagist Coverage Status

middle ware for front-engineer to server

simple server for api merge

usage:

npm install node-interface  
cd ./node-interface  
sudo npm install
sh ./bin/start.sh n (n means how many ports will be listened(8030+n))

examples:

$.ajax({
	url:'http://127.0.0.1:8031',
	type:'post',
	data:{
		0:{
			url:'http://url',
			type:'get',
			data:'uId=1'//use key=value&key=value, beacuse this is get method
		},
		1:{
			url:'http://url',
			type:'post',
			data:{uId:1}//use object , because this is post method
		}
	},
	success:function(data){
		console.log(JSON.parse(data))//the data is an Array ,and it include [data[0],data[1]]
	}
})
  • node-interface will help you to request data0.url && data1.url and merge the response return back to users

  • The success data has contained data0&data1 result;

  • server client must has restful API status to ensure node can check,API status changes in ./app/deps/httpRequest line 34

1.0.0 version

  • project established

1.1.0 version

  • add testing

1.3.0 version

  • add post method

1.5.0 version

  • add other routers for 404,only /apis can be readed
  • add start.sh to establish pm2 cluster usage: sh start.sh + n (n means how many ports will get start)

1.7.3 version

  • change readme
  • add koa-helmet(has been noted in index.js)

1.9.0 version

  • change router,make apis first

2.0.0 version

  • add LICENSE and add coverage

issues

License

  • MIT
2.0.0

7 years ago

1.9.0

7 years ago

1.7.3

7 years ago

1.7.0

7 years ago

1.5.0

7 years ago

1.3.0

7 years ago

1.0.0

7 years ago

0.0.2

12 years ago

0.0.1

12 years ago