Express.js
In order for Stringtale to work, a back-end server is required. One of our supported options is Express.js. In this guide we’ll go over the manual implementation of Stringtale using Express.js.
Manual implementation
To use Stringtale in your Express.JS application with the app router you can either use stringtale init
from our CLI or
execute the following steps manually.
-
Install the
@stringtale/express
and@stringtale/react
package in your project using your package manager. -
Add the
/api/stringatale
route to your routes file in Express.JS. Example:For more information on how to obtain an API key, please refer to the obtaining an API key guide.
-
Modfiy the
app.js
/app.tsx
of your React application to provide the Stringtale Context to your application.For more information about Contexts and Context Providers see this React blogpost and the React documentation.