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 构建工具

  • 安装

    参考 https://docs.haskellstack.org/en/stable/README/#how-to-install

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

构建

构建有点慢

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
  • 效果
    hasura graphql server (haskell)构建_第1张图片
    hasura graphql server (haskell)构建_第2张图片
    hasura graphql server (haskell)构建_第3张图片
    hasura graphql server (haskell)构建_第4张图片

参考资料

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

 
 
 
 

你可能感兴趣的:(hasura graphql server (haskell)构建)