@task
def sharejs(ctx, host=None, port=None, db_url=None, cors_allow_origin=None):
 if host:
  os.environ['SHAREJS_SERVER_HOST'] = host
 if port:
  os.environ['SHAREJS_SERVER_PORT'] = port
 if db_url:
  os.environ['SHAREJS_DB_URL'] = db_url
 if cors_allow_origin:
  os.environ['SHAREJS_CORS_ALLOW_ORIGIN'] = cors_allow_origin
 if settings.SENTRY_DSN:
  os.environ['SHAREJS_SENTRY_DSN'] = settings.SENTRY_DSN
 share_server = os.path.join(settings.ADDON_PATH, 'wiki', 'shareServer.js')
 ctx.run('node {0}'.format(share_server))

@ task def sharejs ( ctx , host = None , port = None , db_url = None , cors_allow_origin = None ) : if host : os . environ [ 'SHAREJS_SERVER_HOST' ] = host if port : os . environ [ 'SHAREJS_SERVER_PORT' ] = port if db_url : os . environ [ 'SHAREJS_DB_URL' ] = db_url if cors_allow_origin : os . environ [ 'SHAREJS_CORS_ALLOW_ORIGIN' ] = cors_allow_origin if settings . SENTRY_DSN : os . environ [ 'SHAREJS_SENTRY_DSN' ] = settings . SENTRY_DSN share_server = os . path . join ( settings . ADDON_PATH , 'wiki' , 'shareServer.js' ) ctx . run ( 'node {0}' . format ( share_server ) )
start a local sharejs server .