Giter Site home page Giter Site logo

juanjtorres11 / server_info Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 2.42 MB

Web application build with Go and Vue.js that retrieves and display information about the servers of a given domain.

License: MIT License

Go 54.81% JavaScript 0.46% HTML 4.00% Vue 38.72% TypeScript 2.01%

server_info's Introduction

Server Info

Web application that consist of a backend built with go that manage two API endpoints and a frontend built with vue.js to display the information of these endpoints in a user friendly way.

How to deploy

Here is the proccess to deploy the app:

Create the database

  1. Go here to get instructions to install cockroachdb
  2. Follow this instructions to create a secure single node cluster.
  3. In the console enter cockroach sql --certs-dir=certs to start the SQL shell.
  4. Copy and paste the content of db.sql
  5. Close the SQL Shell with \q
  6. Generate a certificate for the user user_servers with cockroach cert create-client user_servers --certs-dir=certs --ca-key=my-safe-directory/ca.key

Compile the backend

You can compile the backend with the go console tool go build ./... then you can execute the binary like any other program.

Start the frontend

  1. Enter the web directory
  2. Install the dependencies with npm install
  3. Initiate the server with npm run serve and it will start in the port 8000

API Endpoints

The endpoints of the API are:

servers_info/domain

Receives a domain like amazon.com and return a JSON with the following information:

{
“servers”: [
{
“address”: “server1”,
“ssl_grade”: “B”,
“country”: “US”,
“owner”: “Amazon.com, Inc.”
},
{
“address”: “server2”,
“ssl_grade”: “A+”,
“country”: “US”
“owner”: “Amazon.com, Inc.”
},
{
“address”: “server3”,
“ssl_grade”: “A”,
“country”: “US”
“owner”: “Amazon.com, Inc.”
}
],
“servers_changed”: true,
“ssl_grade”: “B”,
“previous_ssl_grade”: “A+”,
“logo”: “ https://server.com/icon.png ”,
“title”: “Title of the page”,
“is_down”: false
}
  • servers: contains an array of the servers associated with the domain, each object of the array contains:
    • address: the IP or the host of the server
    • ssl_grade: SSL grade graded by SSLabs
    • country: The country of the server as it appears when using the command whois ip
    • owner: the organization that owns the IP, as it appears when using the whois ip command
  • servers_changed: it is true if the servers changed, regarding a hour or more before
  • ssl_grade: lowest grade of all servers
  • previous_ssl_grade: the grade that had an hour or more before
  • logo: the domain logo taken from the <head> of the HTML
  • title: the title of the page taken from the <head> of the HTML
  • is_down: true if the server is down and cannot be contacted

servers

List the servers that have been previously consulted, even if the browser is restarted.
For example, if you have query amazon.com and google.com the endpoint should return both results:

{
“items”: [
{google.com info},
{amazon.com info}
]
}

server_info's People

Contributors

dependabot[bot] avatar juanjtorres11 avatar

Watchers

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