Skip to content

vpdb/server

Repository files navigation

VPDB

A database for Virtual Pinball tables.

Build Status Test Coverage Dependencies

What is it?

VPDB is an open platform where people can share their digital recreations of virtual pinball tables and everything else around virtual pinball. This is the server side of the platform, a.k.a the API. If you're looking for the web application, it's here.

Stack

VPDB runs on a Node.js stack written in TypeScript. The web framework is koa. Data comes from MongoDB and queues and caches are handled by Redis.

"Quick" Install

  • Download and install GraphicsMagick, pngquant, OptiPNG, FFmpeg and Unrar and make sure that the binaries are in your PATH.
  • Install MongoDB and Redis. Windows: Get binary here, extract it to somewhere, open an admin shell and run redis-server --service-install redis.windows.conf --loglevel verbose --maxheap 500m for a local dev setup.

Install Node.js 8+ and Git, then open a command line and type:

git clone https://github.com/vpdb/server.git vpdb-server
cd vpdb-server
npm install
npm run serve:dev

That's it, the API should now be available. Retrieve current version:

curl http://localhost:3000/api/v1

For more detailed instructions, check out the Installation Guide.

Cool Stuff

Tests

There are 1200+ automated integration tests. It's best to use two terminals to run them:

  • npm run test:serve - Runs the server in test mode
  • npm run test:run - Runs the tests

For more info, see tests.

Code Quality

When running the server in development or test mode, the code is linted using JSHint. If the code doesn't pass, tests fail. You can run the linting manually with the lint task.

There's also continuous integration running on two services:

Status
Travis CI Build Status Travis CI
Codeship Build Status Codeship

After every test run, code coverage stats are sent to Coveralls.io.

Code is also run through Code Climate, with the following result: Code Climate

Credits

  • To Mukuste. He gave the community such a nice momentum and I thought I could add a little bit to it.
  • To Tom for his support of this project.

IntelliJ IDEA

Thanks also to JetBrains for their awesome IDE and support of the Open Source Community!

Sqreen | Runtime Application Protection

Finally, big shouts to Sqreen for their excellent security services protecting our host at vpdb.io!

License

GPLv2, see LICENSE.