This is an example Grouparoo application that is configured using declarative configuration set up by our development tool UI. It will sync data from a local SQLite database to Mailchimp.
You can learn more about how it works by reading the documentation. Or take a brief tour by watching this video.
To get started, first install the dependencies:
$ npm install
The SQLite source database gets created from two CSV files in the data
directory. You can create and load this data by running the import script:
$ npm run import
The destination used in this example is Mailchimp. You will need two environment variables for the syncing to work properly: GROUPAROO_OPTION__APP__MAILCHIMP_API_KEY
and GROUPAROO_OPTION__DESTINATION__MAILCHIMP_LIST_ID
.
Begin by copying .env.example
to .env
. Then, fill in these two values. If you aren't familiar with connecting to Mailchimp, you can read more about generating an API key and finding your list ID here.
That's it! Now your Source and Destination are ready to be used. You can run Grouparoo!
If you want to try it without Mailchimp, delete the files apps/mailchimp.json
and destinations/newsletter.json
from this repo.
To start running Grouparoo, run the start
script:
$ npm start
Now, you're off to the races! This will begin the import and export and will also start a UI web server, which you can visit at http://localhost:3000/.
The configuration can be updated via our UI:
$ npm install -g grouparoo
$ grouparoo config
You can run our sync processes via the command line without the UI:
$ npm install -g grouparoo
$ grouparoo run
This project is configured to run a Jest test suite. To run the tests locally, use the following command:
$ npm run test
There is also a configuration file that can be used to run the tests using GitHub Actions. This file is .github/workflows/test.yml
.
Note that Jest is configured to use __tests__/.env
for environment variables and __tests__/fixtures/config
as the directory in which to place your test configuration files. These values are set in jest.config.js
.
Visit https://github.com/grouparoo/app-examples to see other Grouparoo Example Projects.