GithubHelp home page GithubHelp logo

akarsh / nodejs-envoy-proxy Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 23 KB

how to use Envoy Proxy with a Node.js web server inside a Docker container

License: GNU General Public License v3.0

Dockerfile 71.68% JavaScript 28.32%
docker docker-compose envoy expressjs nodejs

nodejs-envoy-proxy's Introduction

Node.js Envoy Proxy

This project demonstrates how to use Envoy Proxy with a Node.js web server inside a Docker container.

Table of Contents

Introduction

The Node.js Envoy Proxy project showcases the integration of Envoy Proxy with a Node.js web server running in a Docker container. Envoy Proxy is used as a sidecar proxy to handle incoming traffic and forward requests to the Node.js server. This setup provides features like load balancing, routing, and service discovery.

Features

  • Integration of Envoy Proxy with Node.js web server
  • Dockerized deployment for easy setup and scalability
  • Load balancing and routing capabilities provided by Envoy Proxy

Installation

To run the Node.js Envoy Proxy project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/akarsh/nodejs-envoy-proxy.git
    cd nodejs-envoy-proxy
  2. Install dependencies:

    npm install
  3. Build the Docker images:

    docker-compose build

Usage

After installation, you can run the project using Docker Compose:

docker-compose up

Once the containers are up and running, you can access the Node.js web server via http://localhost:3000 and the Envoy Proxy at http://localhost:8080.

IP_ADDRESS

To replace <IP_ADDRESS> with the IP address of your host machine, you need to determine the IP address that your Envoy Proxy container should use to reach the Node.js server running on the host.

Here's how you can find the IP address of your host machine:

  1. macOS

If you're using macOS, you can use the ifconfig command to find the IP address of your network interface. Open a terminal and run:

ifconfig | grep "inet "

Look for the IP address associated with your network interface (usually en0 or en1).

  1. Linux

If you're using Linux, you can use the ip addr show command to find the IP address of your network interface. Open a terminal and run:

ip addr show

Look for the IP address associated with your network interface (usually eth0 or wlan0).

  1. Windows

If you're using Windows, you can use the ipconfig command to find the IP address of your network interface. Open a command prompt and run:

ipconfig

Look for the IPv4 address associated with your network interface.

Once you have the IP address, replace <IP_ADDRESS> in your Envoy configuration file with the IP address you found. Ensure that your Node.js server is listening on the same IP address. After making the changes, restart your Envoy Proxy server, and it should now be able to communicate with your Node.js server using the correct IP address.

License

This project is licensed under the GPL-3.0 License. See the LICENSE file for details.

nodejs-envoy-proxy's People

Contributors

akarsh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.