api_for_domains

Introduction: A Server that provides an API for search information about domains and a Client in an android app for use the API
More: Author   ReportBugs   
Tags:

Steps to run server in windows:

  1. must have installed CockroachDB and golang
  2. run on cmd console:

    go get -d github.com/buaazp/fasthttprouter
    go get -d github.com/lib/pq

  3. initialize and create cockroach database:

    In the same console opened or another one, go to the directory where cockroach is. There execute:

    cockroach start-single-node --insecure --listen-addr=localhost:26257 --http-addr=localhost:5001
    In another cmd console
    cockroach sql --insecure create database reto_prueba; set database = reto_prueba;

  4. creating tables needed into cockroach:

    In the last cmd console opened

    create table history (

         domain STRING(200) NOT NULL,
         searched_at TIMESTAMPTZ NOT NULL    
    

    );

    create table domain (

         name STRING(200) PRIMARY KEY,
         ssl_grade STRING(5) NOT NULL,
         previous_ssl_grade STRING(5) NOT NULL,
         searched_at TIMESTAMPTZ NOT NULL    
    

    );

  5. run server:

    The server port it's found in Main.go file or in the console when server it's runnig

    go run Main.go Handler.go

Steps to install android apk:

In the folder ApiForDomains there's a file called App_V1_0.apk
That build apk has the ip of my localhost so must not work, you have to change it and re-build apk.
To edit and re-build you need Android Studio to open the project and change the IP, it's on Constants on the folder util.

Apps
About Me
GitHub: Trinea
Facebook: Dev Tools