Giter VIP home page Giter VIP logo

tabletop-asset-server's Introduction

tabletop-asset-server

tabletop-asset-server

A support server for the tabletop-server project.

yarn install

Configuration

yarn install

This will create a content directory on disk with yaml files along with a indexdb backed pouchdb

Running

To build the initial database of assets:

yarn start

To run the webserver after the database has been created

yarn serve

Routes

Currently the only functional route is:

http://localhost:3009:/assets/:type/:module/:id

where

  type: ['monsters','spells','items']
  module: Any of the ones configured in config.yaml, for example 'core'
  id: a mout/slugified name string such as 'aboleth' or 'lightning-bolt'

e.g.

http://localhost:3009:/assets/monstes/core/aboleth

Task System

To modify or add the tasks that are run, have a look at config.yaml

Adding new tasks

To add new tasks, add the definition in src/tasks (or use one of the existing definitions) and under config.yaml .tasks either into the 'full' task flow or into your own custom flow (which can by run with yarn start --type <flow>).

PouchDB frontend (optional)

To view / manipulate the pouchdb database one can use pouchdb-server if wanted

npm install pouchdb-server
yarn pouch
open http://localhost:5894/_utils/

for databases for the modules to show up in the Futon UI, just create them in the frontend once.

Using a remote database

By default pouchdb uses leveldown as a storage adapter to persist the database on disk. To use a remote database (pouch/couchdb) instead, modify args.location for the database tasks accordingly

  location: http://127.0.0.1:3010

tabletop-asset-server's People

Contributors

georgzoeller avatar

Watchers

James Cloos avatar  avatar

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.