If your SaaS product is built with Node.js and you want to incorporate Directory Sync functionality, you can do a dry-run of the Directory Sync integration on our example Node.js app which makes use of the WorkOS Node.js SDK.
1. In your CLI, navigate to the directory into which you want to clone this git repo:
2. Clone this repo and install dependencies:
3. Navigate to the cloned repo:
4. Install the dependencies:
6. Create a .env file in the example app’s project directory, node-directory-sync-example/. (This file is listed in this repo's .gitignore file, so your sensitive information will not be checked into version control.)
7. Open the .env file with your preferred text editor and add the WORKOS_API_KEY and WORKOS_CLIENT_ID:
8. To ensure the example app is served as expected, start the server:
9. Navigate to http://localhost:8000/ to view your directories! You should see a WorkOS-branded example webpage that lists your directories (if any have been set up yet).
If you get stuck and aren't able to resolve the issue by reading our WorkOS Directory Sync documentation, API reference, or tutorials, you can reach out to us at [email protected] and we'll lend a hand.