Jovo offers a variety of server integrations that allow you to host your apps on your own server or cloud platforms like AWS.
The following server integrations are currently working with Jovo
- Express: Host your apps on your own server. This is also used for the local development server.
- AWS Lambda: Host your apps on AWS Lambda serverless functions.
Usually, a server is connected to an app config stage. For example, the development stage in
app.dev.ts uses Express, which you can see in the last line of the file:
export * from './server.express';
If you add a new stage using the
jovov4 new:stage <stage> command (as explained in the app config docs), the Jovo CLI prompts you to select a server integration. So, for example, if you create a new
prod stage and select AWS Lambda, the following line will be added to your
export * from './server.lambda';
You can use the
$server property to access specific elements from the request and response.
You can access request headers using the
Jovo converts all properties to lowercase. For example, you can access the
Authorization header like this:
You can access query parameters using the
You can set additional response headers that will be merged with existing ones using the
this.$server.setResponseHeaders(header: Record<string, string>);