olange / arcade

A distributed arcade game and mashup of a few delighful arcade games from the eighties — including restoration of an original Pacman Arcade Cocktail table (Karateco 1984)
https://d-arcade.app
Apache License 2.0
1 stars 1 forks source link

Fetch books with ApolloClient #3

Closed rudifa closed 4 years ago

rudifa commented 4 years ago

@olange Please test and consider for merging into the master

fetchBooks() {
    console.log("fetchBooks: Looking up available books…");
    client.query({ query: BOOKS_QUERY }).then((result) => {
      this.books = result.data.books;
    });
}

This is a small step for the mankind, but a big step for this programmer.

One more thing: npm-scripts.py

engine % npm-scripts.py
scripts:
  start          node index.js
  test           echo "Error: no test specified" && exit 1
  docker:build   DOCKER_BUILDKIT=1 docker build --tag olange/arcade-engine .
  docker:start   docker run --detach --name arcade-engine --publish 4000:4000 olange/arcade-engine
  docker:stop    docker rm -f $(docker ps -a --filter 'name=arcade-engine' -q)
rudifa commented 4 years ago

More changes:

app % npm-scripts.py
scripts:
  build               rimraf dist && rollup -c rollup.config.js
  start:build         npm run build && es-dev-server --root-dir dist --app-index index.html --open --compatibility none
  start               es-dev-server --app-index index.html --node-resolve --open --watch
  start:build:watch   nodemon --watch src --exec 'npm run start:build' --verbose