4.0.1 • Published 6 years ago

nodesul v4.0.1

Weekly downloads
23
License
ISC
Repository
github
Last release
6 years ago

Welcome!

This is my npm module where I am just testing some features of npm development.

Installing

Running

With Linux to start listening on PORT (this case 80) may require sudo privileges

  • Through github
    • node app.js
  • Through npm
    • node node_modules/nodesul

Features

  • http://<SERVER_IP>/Greeting * Sending a JSON POST request with the form:
    	```javascript
    		var request = {
    			"name" : "<YOUR_NAME_GOES_HERE>"
    		};
    		//Example
    		var request = {
    			"name" : "Saul"
    		};
    	```
    	* Will have as a response a JSON of the form:
    	```javascript
    		var response = {
    			"rsp" : "200",
    			"msg" : "Feliz Cumpleanos <YOUR_NAME_GOES_HERE>!!!" //I made this on my birthday :p
    		};
    		//Example
    		var response = {
    			"rsp" : "200",
    			"msg" : "Feliz Cumpleanos Saul!!!"
    		};
    	```
  • http://<SERVER_IP>/ Here there will be a render index.html page to handle the POST request (using AJAX) of the previous Greeting feature. alt text This is the display of the response. alt text

  • http://<SERVER_IP>/Convert * Sending a JSON POST request with the form:

    	```javascript
    		var request = {
    			"from" : "<ORIGIN_CURRENCY_CODE>",
    			"to" : "<DESIRED_CURRENCY_CODE>",
    			"amount" : <AMOUNT_TO_CONVERT>
    		};
    		//Example
    		var request = {
    			"from" : "MXN",
    			"to" : "USD",
    			"amount" : 1
    		};
    	```
    	* Will have as a response a JSON of the form:
    	```javascript
    		var response = {
    			"from" : "<ORIGIN_CURRENCY_CODE>",
    			"to" : "<DESIRED_CURRENCY_CODE>",
    			"amount" : <AMOUNT_TO_CONVERT>,
    			"convertedAmount" : <CONVERTED_AMOUNT_TO_DESIRED_CURRENCY>
    		};
    		//Example
    		var response = {
    			"from" : "MXN",
    			"to" : "USD",
    			"amount" : 1,
    			"convertedAmount" : 0.0524
    		};
    	```	
4.0.1

6 years ago

4.0.0

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.0

6 years ago

1.0.4

6 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago