Skip to content

A Server that provides an API for search information about domains and a Client in an android app for use the API

Notifications You must be signed in to change notification settings

kliver98/api_for_domains

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api_for_domains

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

  1. 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;

  1. 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 );

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

About

A Server that provides an API for search information about domains and a Client in an android app for use the API

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published