api_for_domains
Steps to run server in windows:
- must have installed CockroachDB and golang
run on cmd console:
go get -d github.com/buaazp/fasthttprouter
go get -d github.com/lib/pqinitialize 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;creating tables needed into cockroach:
In the last cmd console openedcreate 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);
run server:
The server port it's found in Main.go file or in the console when server it's runniggo 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.
