Once cockroach is installed.
Running cockroack
cockroach start --insecure
Now cockroach is running on port 8080.
Running sql shell
cockroach sql --insecure
Execute in the shell
CREATE DATABASE sofos;
SET DATABASE = sofos;
CREATE TABLE DomainInformation (
SSLGrade VARCHAR(5),
Title VARCHAR(100),
IsDown BOOLEAN,
Domain VARCHAR(50)
);
CREATE TABLE HistoryQueries (
Domain VARCHAR(50),
LatestQuery TIMESTAMP
);
CREATE TABLE RelatedServers (
Domain VARCHAR(50),
Server VARCHAR(50)
);
CREATE USER IF NOT EXISTS sofos_u;
ALTER USER sofos_u WITH PASSWORD 'g7D239Asn1';
GRANT ALL ON historyQueries TO sofos_u;
GRANT ALL ON DomainInformation TO sofos_u;
GRANT ALL ON RelatedServers TO sofos_u;
Once go is installed
cd go_chi
./main
Now go is running on port 3000.
In order to rebuild the executable.
go get -u github.com/go-chi/chi
go get -u github.com/lib/pq
Once Node and npm are installed
npm install -g @vue/cli
cd vue_app
npm install
npm run serve
Now go is running on port 8081.
The web application will be available at localhost:8081 if the port is not being used.