An example application demonstrating to use the WorkOS Node SDK to power Directory Sync.
Node.js version 10+
-
In your CLI, navigate to the directory into which you want to clone this git repo.
$ cd ~/Desktop/
-
Clone this repo and install dependencies:
# HTTPS git clone https://github.com/workos-inc/node-directory-sync-example.git
or
# SSH git clone [email protected]:workos-inc/node-directory-sync-example.git
-
Navigate to the cloned repo.
$ cd node-directory-sync-example
-
Install the dependencies.
$ npm install
- Grab your API Key.
- Get your Client ID.
- Create a
.env
file at the root of the project and populate with the following environment variables (using values found above):
WORKOS_API_KEY=your_api_key_here
WORKOS_CLIENT_ID=your_project_id_here
npm start
Head to http://localhost:8000/
to navigate your directories!
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.