Thanks to visit codestin.com
Credit goes to github.com

Skip to content

My first Proxy Server that was made utilizing NodeJS.

Notifications You must be signed in to change notification settings

PabloFLPs/my-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proxy Server

A Proxy server is a server that acts as a middle layer when requesting data from a 3rd party API. In building a proxy server, you will create a server that requests data from an external API and serves the user that information.

User <------> Proxy <-----> Internet Domain

So the Proxy receives requests from the internal network (LAN) and forward them to the internet and vice versa.

Creating a Proxy Server

This application is a simple proxy server that redirects the user to the specified website. Example: localhost:PORT/google will redirect the client to https://google.com

Steps to configure the application:

  • Create a directory. In this case, mine is: my-proxy

  • Create a new Node project: yarn init -y The "-y" or "--yes" flag means "yes" to all configs, btw it is a default configuration.

  • Installing Express dependencies: yarn add express

  • Installing "http-proxy-middleware" dependencies: yarn add http-proxy-middleware

  • Adding a "start" command to our project:

    ,
    "scripts": {
        "start": "node index.js"
    }
    

This will allow us to run our project with "yarn start".

  • Install nodemon for re-running after changes: yarn add nodemon

About

My first Proxy Server that was made utilizing NodeJS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published