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.
Here is the proccess to deploy the app:
- Go here to get instructions to install cockroachdb
- Follow this instructions to create a secure single node cluster.
- In the console enter
cockroach sql --certs-dir=certs
to start the SQL shell. - Copy and paste the content of db.sql
- Close the SQL Shell with
\q
- 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
You can compile the backend with the go console tool go build ./...
then you can execute the binary like any other program.
- Enter the web directory
- Install the dependencies with
npm install
- Initiate the server with
npm run serve
and it will start in the port 8000
The endpoints of the API are:
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
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}
]
}