Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Main Repository

Disclaimer

If you want to continue development with Node.js, we highly recommend reading their documentation.

Prerequisites

To run the following code example, you'll need Node.js and the Axios HTTP client:

You should also have a Decodo account with access to the dashboard to get your credentials and endpoint information.

Installation

Once you have the prerequisites installed, follow these steps to set up your project:

  1. Using the Command Prompt/Terminal, create your project directory using the mkdir node_example command.
  2. Navigate to your project folder using the cd node_example command.
  3. Copy the code directly from the above or execute the following command to download the proxy setup example file:

HTTP(s): curl https://raw.githubusercontent.com/Decodo/Decodo/master/nodejs/node.js > node.js

SOCKS5: curl https://raw.githubusercontent.com/Decodo/Decodo/master/nodejs/node.js > nodesocks5h.js

image
  1. You should see a new file named node.js in your project folder. Open it using a code editor of your choice.

  2. To run this example, set your username, password, and endpoint information you'd like to use and enter them in the following sections of the code:

proxy: {
    host: 'gate.decodo.com'
    port: 7000,
    auth: {
        username: 'user',
        password: 'password'
    }
}

Usage

To execute the Node.js example, simply run node node.js.

You should see an IP address in the console window if everything was set up correctly:

image

Need help?

Email - [email protected]

Live chat 24/7