project.js - Project Configuration
project.js is an essential file that stores a lot of important project information that is used for deployment.
- Language Model
project.js is used by many features of Jovo, for example to build platform specific project files with the Jovo CLI, or to add different stages for more convenient deployment.
Here is a list of all elements that can be added to the
||Alexa Skill project config|
||Google Action project config|
||Includes natural language understanding tools like
||Endpoint for the voice platforms to reach your app. Default: Jovo Webhook.|
||Deployment information (e.g. if hosted on Lambda, but endpoint is API Gateway)|
||Different deployment stages|
||Default stage to use if not defined differently in the environment variables|
This is what the default
project.js looks like:
As you can see above, an
endpoint is automatically added to the file with your unique Jovo Webhook endpoint.
Alternatively, you can reference values from your
environment variables like so:
These environment variables are usually stored in a
.env file or in your cloud environment, for example AWS Lambda.
With the Jovo CLI, you can create and deploy project files (e.g. language models) that are specific to each voice platform. Deployment of project files is currently only supported for Alexa Skills and Google Actions.
The introduction already shows how a freshly created
project.js looks like for both platforms
googleAction. In the following section, you will learn about additional configurations to the voice platform projects.
For every platform, an
nlu element is added for additional options regarding natural language understanding tooling. For example:
Right now, the built-in
alexa nlu for Amazon Alexa and
dialogflow for Google Assistant are supported.
For the language model conversion, a
lang object can be added to the
In the above example, the object specifies the following process for the
jovo build command:
- Access an existing Jovo Language Model file
- Convert it into an Alexa Interaction Model
project.js, you can also add or override specific elements of your language model in the
Changing the invocation name is especially useful for different stages if you want to make sure you know which version of your voice app you're currently talking to.
For example, you can override the language model for the
en-US locale like this:
NOTE: Currently, the invocation name can only be specified in the
models folder for Alexa Skills. For Google Actions, you need to change them in the Actions on Google Console.
You can also add whole intents and inputs and any element that you can find in your e.g.
en-US.json in the Jovo
For example, you can add an intent to specific stages like so:
Jovo allows you to define multiple staging environments like
prod in your
The elements inside a stage are merged into the elements outside the stage with the ability to override configurations. You can also add a
defaultStage element (although not necessary):
For an overview of staging examples, take a look at our Staging Examples.
A stage is active when one of the following is true (by default, only the elements outside the
stages are used):
- The default stage is set with
- The stage is set in the environment variables with
Sometimes (for example, if you are using an API Gateway), your
endpoint might differ from the destination where the code is located (the
You can add a
host object to specify where the code is hosted. Right now,
lambda is supported to deploy your code to AWS Lambda. This is how you can set it up:
Note: If you're only building an Alexa Skill, there is no need to specify a host with the same information that is already in the
endpoint. This is mostly important if you also want to host your Google Action on AWS Lambda and make it accessible through an API Gateway.