- Create basic API REST to render domains.
domain/yourdomain
- Once that we have the
domain
we can create:
- GET request to SSLLABS to get the servers info. You can see the docs here.
- GET request to ipInfo to get the country and the organization name (API Key generated and Env variable created). I tried with golang-packages but there are some issues.
- GET request to metadata to get the image and the title of the webpage.
- Create Cockroach database
- Download and install from CockroachLabs, also I saw this video and followed this tutorial.
CREATE USER IF NOT EXISTS juanc;
CREATE DATABASE domains;
GRANT ALL ON DATABASE domains TO juanc;
SET DATABASE = domains;
CREATE TABLE tbldomains(id SERIAL PRIMARY KEY, name VARCHAR, count INT);
INSERT INTO tbldomains (name, count) VALUES('pushdev',5);
SELECT * FROM tbldomains;
UPDATE tbldomains SET count = 5 WHERE id = '554066634883203073';
DROP TABLE tbldomains;
DELETE FROM tbldomains WHERE name='pushdev';
- Install Vue. With nodejs run
npm i -g @vue/cli
vue create domains-app
cd domains-app
npm i vue-resource --save
- How to install bootstrap
- Inside the project db folder run in a new Powershell
cockroach start --insecure --listen-addr=localhost:26257 --http-addr=localhost:8080
. - Open a new Powershell and inside the project db folder run
cockroach sql --insecure
. go run environment.go main.go
. Openhttp://localhost:8081/
npm run serve -- --port 3000
. Openhttp://localhost:3000/
Enjoy!