Test your Root Bot
Root supports testing your Bot locally. Your Bot still needs a valid DEV_TOKEN because execution isn't fully local. Calls to the Community API (e.g., programmatically creating a new message in a community channel) will go through Root's servers and then to the Root native client.
Bot execution
Your Bot will run inside the Root DevHost. The DevHost is a Node execution environment that's part of the Root SDK.
Usage
To launch your Bot inside DevHost, do the following:
-
Open a terminal in your Bot's project folder.
-
Run the following command:
npm run botThe
botscript is defined in thepackage.jsonfile; it's shorthand for this:rootsdk start devhostThe devhost reads your launch entry-point from the
root-manifest.jsonfile in your project folder. Your entry-point file is the file containing the call tostart:await rootServer.lifecycle.start();
Root native client
To see your Bot interacting with the community, you can launch the Root native client and navigate to the community represented in your DEV_TOKEN. The starter-code Bot responds to the /echo command and replies with the text you include after the command.