MarkLogic 9 Product Documentation
flexrep.createAppserverflexrep.createAppserver(
cfg as element(configuration),
group as (Number|String),
name as String,
port as (Number|String),
db as (Number|String)
) as element(configuration)
Summary
This function creates a flexrep App Server programatically,
without needing to know all of the specific settings.
Parameters |
cfg |
The replication configuration
to use for the new App Server. |
group |
The ID of the group to which
the App Server will be added. Typically, this is the result of an
admin.groupGetId
call. |
name |
The name for the new App Server. |
port |
The port on which the App Server listens.
The port must be available on the host. |
db |
The ID for the database connected
to this App Server. |
Example
const flexrep = require('/MarkLogic/flexrep');
const admin = require('/MarkLogic/admin');
const cfg = admin.getConfiguration();
admin.saveConfiguration(
flexrep.createAppserver(
cfg,
xdmp.group('Default'),
'Replica-server',
8010,
xdmp.database('Replica')));
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.