-
Notifications
You must be signed in to change notification settings - Fork 1
Creating a new module
Marius Coțofană edited this page Feb 21, 2016
·
3 revisions
In wouso.js a module is organised as:
- an backed API
- a single page React.js app (optional)
Modules can be games included in the platform (e.g. qotd, quest) or core modules that bring extra functionality to the platform (e.g. wouso-social-login) or themes, that change the visual aspect of the platform (e.g. wouso-foundation).
- Start by choosing the type of module you want to develop (core module, game or theme) and enable it in the config file. In this example we will go with a new game module called quest.
{
"hostname": "localhost:4000",
"language": "en",
"modules" : {
"wouso-social-login" : true
},
"games": {
"qotd" : true,
<b>"quest": true</b>
},
"themes": {
"wouso-foundation": true
},
"superuser": {
"root@root.com": "marius"
},
[...]
TODO:
TODO:
There is a centralised logging system, which can be used by requiring the core/logging module from the repo.
var log = require('../../core/logging')('qotd')
To use it
log.info('User started game.')