-
npm build
-
start the http server
./bin/start.js
open a separate console and you can either do a lookup (of multiple emails)
./bin/lookup.js example.org [email protected]
a successful lookup of an email that exits return:
{
customer: { emailStatus: 'already_subscribed' },
action: { customFields: { isSubscribed: true } }
}
and an empty json otherwise
there are a bunch of bin that are simple wrappers around the http endpoints (cf below)
./bin/update.js
./bin/remotelookup.js
./bin/testlookup.js
by default (if you don't stop bin/start.js), the database is automatically updated at 5am
there are all http post
- /lookup -> lookup on locale db (needs to run update at least once)
- /test/lookup -> returns confirmed half of the time, not found the other half
- /remote/lookup -> remote on the CRM (act as proxy), mostly to test
- /update -> download from the CRM and update the local database
TRUST_KEY
- Trust CRM API keyTRUST_SALT
EMAILS_URL
- Trust newsletter list
JOB_INTERVAL
- When to update database, default '5 0 * * *' (05.00)DB_PATH
- default './emails.db'