2021年10月25日

PostGraphile

-------------------------------------------------------
node.js


sudo apt update

sudo apt install nodejs
-------------------------------------------------------



npm install -g postgraphile



-------------------------------------------------------
PostgreSQLとPostGraphileでサクッとGraphQLエンドポイントを作成する


-------------------------------------------------------
sudo gedit !/usr/bin/env bash

#!/usr/bin/env bash
pnpx postgraphile \
  --connection postgres:///postgres \
  --watch
-------------------------------------------------------




‣ GraphQL API:         http://localhost:5000/graphql
  ‣ GraphiQL GUI/IDE:    http://localhost:5000/graphiql
  ‣ Postgres connection: postgres://postgres:[SECRET]@localhost/mydb (watching)
  ‣ Postgres schema(s):  public
  ‣ Documentation:       https://graphile.org/postgraphile/introduction/
  ‣ Node.js version:     v10.19.0 on linux x64
  ‣ Join Robert Claypool in supporting PostGraphile development: https://graphile.org/sponsor/
  
  
  
  
  
posted by a23 at 08:39| Comment(0) | PostgreSQL

2021年10月24日

ubuntu20.04 pgAdmin4


ubuntu20.04にpostgreSQLとpgAdmin

Screenshot from 2021-10-24 10-28-29.png




sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

sudo apt install pgadmin4

 sudo /usr/pgadmin4/bin/setup-web.sh
mail
pass
Screenshot from 2021-10-25 10-31-41.png

posted by a23 at 10:28| Comment(0) | PostgreSQL

2021年10月19日

go git

Err
main.go:7:2: cannot find package "github.com/lib/pq" in any of:
        /usr/local/go/src/github.com/lib/pq (from $GOROOT)
        /home/ub1/go/src/github.com/lib/pq (from $GOPATH)


sudo apt install git

Screenshot from 2021-10-19 09-40-44.png



Err
b1@ub1-System-Product-Name:~/golang/03$ go get github.com/mattn/go-sqlite3
# github.com/mattn/go-sqlite3
cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in $PATH


sudo apt install gcc
Screenshot from 2021-10-19 09-49-05.png
posted by a23 at 09:39| Comment(0) | Golang