Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/healeycodes/chessboard-representation-api
Node.js/Express microservice. Takes FEN string, returns its HTML chess board representation.
https://github.com/healeycodes/chessboard-representation-api
api chess chessboard chessboard-representation fen-string node
Last synced: 24 days ago
JSON representation
Node.js/Express microservice. Takes FEN string, returns its HTML chess board representation.
- Host: GitHub
- URL: https://github.com/healeycodes/chessboard-representation-api
- Owner: healeycodes
- Created: 2018-05-30T01:08:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T23:47:22.000Z (almost 2 years ago)
- Last Synced: 2024-10-05T17:42:45.283Z (3 months ago)
- Topics: api, chess, chessboard, chessboard-representation, fen-string, node
- Language: JavaScript
- Homepage: https://chessboard-api.glitch.me
- Size: 482 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/healeycodes/chessboard-representation-api.svg?branch=master)](https://travis-ci.org/healeycodes/chessboard-representation-api)
## Chessboard Representation API
An old project I brought back to life!
It was an experiment to create a general-use chessboard representation API. I kept the useful parts.
![alt text](https://github.com/healeycodes/show-chessboard-with-express/blob/master/public/img/example-board.png "Chessboard")
It's an example of a Node.js/Express/EJS wrapper around chessboard.js.
There are two routes, both of which accept a FEN string and return a page containing a chessboard.js representation of the FEN string in HTML/CSS/JavaScript. GET uses params, POST uses JSON.
Example FEN string: `r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R`
### Routes
GET: /api/fen/``
POST: /api/fen/`{"fen":""}`
### Tech Stack
Node.js/Express with EJS templates, chessboard.js.Tested with Jest and SuperTest. Added Travis CI (06/19).
### Install
```npm install```
### Run
```node .\server.js```
### Test
```npm test```