This repository has been archived on 2024-04-29. You can view files and clone it, but cannot push or open issues or pull requests.
node-fftcg/backend/routes.coffee

25 lines
582 B
CoffeeScript
Raw Normal View History

2019-02-16 18:04:16 +00:00
# local libraries
# (require 'debug').enable 'routes'
path = (require 'path')
2019-02-16 18:04:16 +00:00
# shared libraries
SHARE =
logger: (require 'logging').default 'routes'
jsonschemas:
user: (require './routes/schema/user.schema')()
2019-02-16 18:04:16 +00:00
# fftcg.db (persistent data)
fftcgdb: new (require './db') path.resolve(__dirname, 'fftcg.db'), true
# session storage (volatile data)
session: new (require './session')
2019-02-15 12:06:16 +00:00
module.exports = [
2019-02-16 18:04:16 +00:00
# test
(require './routes/test') SHARE
# register user
(require './routes/user/register') SHARE
# log in user
(require './routes/user/login') SHARE
]