Giter Club home page Giter Club logo

sample-master-external's Introduction

sample-master-external

  1. Getting started:

    1. Using Google Cloud Shell (the simplest option):
      prerequisites: node and npm
      these are available inside Google Cloud Shell.
      1. open two separate terminal sessions:
        • check that your Project Id is shown in yellow/gold in parentheses.
        • in one terminal cd sample-master/internal
        • in the other terminal cd sample-master/external
      2. run npm install in each terminal
      3. run node server.js in the internal terminal
      4. run npm start in the external terminal
      5. click on the "preview" button of your Cloud Shell.
    2. Alternatively, using Your own machine (Windows users, see note at bottom this file):
      prerequisites: node and npm
      1. open two separate terminal sessions:
        • in one terminal cd sample-master/internal
        • in the other terminal cd sample-master/external
      2. run npm install in each terminal
      3. run node server.js in the internal terminal
      4. run npm start in the external terminal
      5. Open a browser and navigate to http://localhost:8080
  2. The sample app
    Uses nodejs with the express web server on both server and client microservices.
    The internal service receives REST requests on port 8082 and returns mock data.
    The external service unpacks json from the internal service into a html template in the Views folder and returns it to the browser on port 8080.

  3. Dependencies
    The internal and external both use the following npm packages:

    The external service uses the following additional libraries:

  4. Windows The external/package.json file uses linux-style syntax for environment variables. Windows users will need to modify the code in order to run the sample locally during development, e.g.

    • **"start": "set SERVER=http://localhost:8082&& node server.js"**,
      
    • **"test": "set SERVER=http://localhost:8082&& nyc mocha"**
      

sample-master-external's People

Contributors

mgurkan27 avatar bdolphin avatar bhuvana-guru avatar nearmegit 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.