hasura graphql server (haskell)構建

安裝 &&運行pg(docker)

version: '3.6'
services:
  postgres:
    image: postgres
    environment:
    - "POSTGRES_PASSWORD:dalong"
    restart: always
    ports:
    - "5432:5432"
    volumes:
    - db_data:/var/lib/postgresql/data
volumes:
  db_data:

安裝satck haskell 構建工具

curl -sSL https://get.haskellstack.org/ | sh

構建

構建有點慢github

cd graphql-engine/server
stack build --fast

運行

  • 啓動pg
docker-compose up -d
  • 運行
stack exec graphql-engine -- --database-url=postgres://postgres:dalong@localhost:5432/postgres serve --enable-console
  • 效果



參考資料

https://github.com/hasura/graphql-engine/blob/master/server/CONTRIBUTING.mdsql

相關文章
相關標籤/搜索