entrijs
v1.4.0
Published
Entri
Downloads
733,827
Keywords
Readme
EntriJS
Use Entri with your JavaScript application.
For full developer documentation, see: https://developers.entri.com
Get started
Install the package
npm install entrijsor
yard add entrijsConnect a domain
import {connectDomain} from 'entrijs';
const config = {
applicationId: '123sample',
dnsRecords: [
{
type: "CNAME",
host: "www",
value: "m.test.com",
ttl: 300,
},
],
token: '345sample',
};
connectDomain(config);showEntri remains available as a deprecated alias of connectDomain.
Read more about the config object.
To close the modal:
import {close} from 'entrijs';
close();Check domain
See the full documentation.
import {checkDomain} from 'entrijs';
const init = async () => {
const result = await checkDomain('mydomain.com', config);
};Purchase domain
See the full documentation.
import {purchaseDomain} from 'entrijs';
purchaseDomain(config);Entri Unify
Launches Entri Unify, where the user can connect an existing domain or purchase a new one. Completed domains are enrolled in Entri Monitor unless the config sets monitor at the root or on any DNS record. See the full documentation.
import {showUnify} from 'entrijs';
showUnify(config);activateDomain remains available as a deprecated alias of showUnify.
Subscribe to events
Register callbacks for Entri events and get back an unsubscribe function. See the full documentation.
import {subscribe} from 'entrijs';
const unsubscribe = await subscribe('onEntriClose', (detail) => {
console.log('Entri closed', detail);
});