Code Monkey home page Code Monkey logo

reburke-proxy-one's Introduction

ReBurke / reburke-proxy-one

A proxy server that serves modules for a listing page

Related Projects

Table of Contents

  1. Usage
  2. Requirements
  3. Deployment
  4. Notes
  5. Screenshot

Usage

Example URL: http://localhost:3000/item/25

All commands from within the repository's root directory.

Installing Dependencies

npm install

Node Express Server

npm start

Requirements

Deployment

Environment Variables

If you use Docker Compose, it will add them from your .env file.

If you run the server with $ npm start, the environment variables are required to be set up in the shell.

Please refer to the default variables in server/index.js for examples.

- PORT=<your-server-port>
- URL=<your-origin-url>
- PHOTO_TARGET=<main-photo-service-url>
- PHOTO_SCRIPT=<main-photo-script-url>
- SB_TARGET=<sidebar-service-url>
- SB_SCRIPT=<sidebar-script-url>
- REVIEWS_TARGET=<seller-reviews-service-url>
- REVIEWS_SCRIPT=<seller-reviews-script-url>
- SLN_TARGET=<similar-listings-and-news-service-url>
- SLN_SCRIPT=<similar-listings-and-news-script-url>

Hosting the Stylesheet on Cloud

Requires the dev dependencies to be installed

  • Create the grunt-aws.json file at $HOME/.aws directory

    {
      "accessKeyId": "<your-access-keyId>",
      "secretAccessKey": "<your-access-secret>",
      "bucket": "<your-bucket-name>",
      "path": "<optional-path>/" || ""
    }
  • Add CLOUD_STYLE_URL=<your-bucket-url[-path]> to the environment variables

  • Run $ grunt on the terminal

Docker

Requires Docker v19.03.12 and Docker Compose v1.26.2

  • Create an .env file in the repository's main folder

  • Add the environment variables and save the file

  • Run $ docker-compose up -d to start running the service on port 80

Notes

If the security group settings and ports are not properly set up for your proxy server or one of the services, you may receive a 504 Gateway Timeout or an ECONNREFUSED error in your proxy. You may follow the instructions in this file to use redirection instead of proxy in your server/index.js.

Screenshot

Screenshot

reburke-proxy-one's People

Contributors

kzlsakal 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.