Launches and supports an Express.js based server to host the voice scripts.
(require("violetSrvr"))(prefix)
Initializes the server.
Parameters:
Name | Type | Description |
---|---|---|
prefix |
where the violet server endpoints will be, for example, '/violet' |
Methods
(inner) createAndListen()
Core Method that launches the web server to listen for incoming requests
(inner) loadScript(scriptPath, name)
Loads Voice Scripts. Loading involves doing a require on the scripts,
registering the scripts intents, and connecting it to the express router.
Parameters:
Name | Type | Description |
---|---|---|
scriptPath |
path to the script to be loaded (multiple scripts can be provided one after the other seperated by commas) | |
name |
app name for the script to be loaded under |