Giter Site home page Giter Site logo

lichess-org / api-demo Goto Github PK

View Code? Open in Web Editor NEW
55.0 7.0 13.0 120 KB

Client-side app using various Lichess APIs for demonstration purpose

Home Page: https://lichess-org.github.io/api-demo/

License: GNU Affero General Public License v3.0

HTML 0.84% JavaScript 2.17% SCSS 14.30% CSS 6.70% TypeScript 75.98%
lichess lichess-api

api-demo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-demo's Issues

Demo not running

I just downloaded a fresh copy of this repo and ran the setup instructions. The server runs but the site that loads is always a blank page. Here are my console warnings (on Chrome, Mac OSX)

Screen Shot 2022-04-27 at 11 59 17 AM

CLI output from build:

Starting up http-server, serving ./

http-server version: 14.1.0

http-server settings: 
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none

Available on:
  http://127.0.0.1:8080
  http://192.168.1.200:8080
Hit CTRL-C to stop the server

Instructions as give fail

Upfront I will grant the possibility that I don't know what I'm doing… That said, here is what I did:

C:\Users\hsmyers>mkdir Lichess

C:\Users\hsmyers>cd Lichess

C:\Users\hsmyers\Lichess>npm install
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\hsmyers\Lichess\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\hsmyers\Lichess\package.json'
npm WARN Lichess No description
npm WARN Lichess No repository field.
npm WARN Lichess No README data
npm WARN Lichess No license field.

up to date in 0.334s
found 0 vulnerabilities

Starting with the first warning, I deleted the lock file and copied the package.json file from this site to my machine and got this:

C:\Users\hsmyers\Lichess>npm install
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\rollup\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN [email protected] requires a peer of @popperjs/core@^2.11.6 but none is installed. You must install peer dependencies yourself.

added 133 packages from 166 contributors and audited 134 packages in 64.788s

22 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

I assumed I could survive the first two warnings (marked optional as they are) but had my doubts about the 'install peer dependencies remark. but to confirm, I went ahead and:

C:\Users\hsmyers\Lichess>npm run build

> lichess-oauth-app-example@ build C:\Users\hsmyers\Lichess
> rollup --config

[!] Error: Could not resolve entry module (rollup.config.js).
Error: Could not resolve entry module (rollup.config.js).
    at error (C:\Users\hsmyers\Lichess\node_modules\rollup\dist\shared\rollup.js:198:30)
    at ModuleLoader.loadEntryModule (C:\Users\hsmyers\Lichess\node_modules\rollup\dist\shared\rollup.js:22306:20)
    at async Promise.all (index 0)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lichess-oauth-app-example@ build: `rollup --config`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lichess-oauth-app-example@ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\hsmyers\AppData\Roaming\npm-cache\_logs\2022-11-17T00_16_59_407Z-debug.log

I believe all of this is a cascade from an improper beginning. So what do I need for a warning and error-free run? Thanks!

--hsm

Help with invite links for creating game

I recently used the Lichess API in a project I'm working on. I managed to create an invite link to start a game, however, both the person who created the link and the person invited to play needed to click the link, which felt a bit weird and unintuitive.
I was wondering if you could help me out with some guidance on how to use invite links. ? I couldn't find an example of this in the demo. Could you provide an example or some tips on how to make this process better?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.