Giter Club home page Giter Club logo

xray-tracker-mapper's Introduction

hostTrackerMapper

Service for the mapping of host names to company names

Project Structure

API

The API folder contains the Tracker Mapper API (trackerMapper.js). This is the script that is run using node js to start the API.

Mapper

The Mapper folder contains mapper.js, which is essenctially the business logic for API. When a request is made for a host name's associated company, it is methods in the Mapper that carry that out.

DB

There are two key elements in this directory, init_db.sql which can be used to initialise the relations in a postgresDB, and db.js which essentially acts as a repository layer set of DB methods used to insert, select and update host and company info stored in the database.

Config

example_config.json shows you the structure that should be used in your own config.json which should be placed along side the example config. Your own config.json should contain the actual information necessary to connect to your PostgreSQL database, including the name you gave to the DB, the port number, as well as account details necessary to connect.

Data

At the moment is not used, but is intended to be a store for Top-Level-Domain information, as well as any predefined company to host information.

How to setup.

  1. From a Linux environment, clone the repository.
  2. initialise a PostgreSQL Database using init_db.sql found in path_to_repo/db/init_db.sql
  3. make a copy of example_config.json and rename it to config.json
  4. update the details of config.json so it accurately reflects your DB setup.
  5. use node js to run the trackerMapperAPI.js file.
  6. from a web browser, navigate to localhost:8080 or localhost:<<whatever port>> if you changed the port number in config.json

xray-tracker-mapper's People

Contributors

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