This repository contains a serverless project integrated with Twilio Studio. It allows you to build and deploy serverless applications that leverage Twilio's communication capabilities. To get started, follow the instructions below.
Before you can run this project, make sure you have the following prerequisites installed:
-
Docker: Install Docker from the official website: https://www.docker.com/
-
Docker Compose: Install Docker Compose following the instructions for your operating system: https://docs.docker.com/compose/install/
-
Node.js: Install Node.js from the official website: https://nodejs.org/
Follow the steps below to set up and run the serverless project:
- Clone the repository:
git clone https://github.com/taynaraMarcondes/chatbot.git
- Change into the project directory:
cd chatbot
- Install dependencies:
npm install
-
Copy the
.env.example
file and rename it to.env
. Edit the.env
file and fill in the required variables with the appropriate values. -
Open the
/assets/ngrok/ngrok.yml
file and replace theauthtoken
placeholder with your actual Ngrok Auth Token. -
Run the containers:
docker-compose up
-
Access the ngrok dashboard by visiting http://localhost:4040 in your web browser. Note the exposed port for the database.
-
Open the
/assets/db/connection.private.js
file and locate the line 7 where the database configuration is set. Substitute the database port with the one obtained from the ngrok dashboard. -
Deploy the serverless project by running the following command:
twilio serverless:deploy
Once the installation and deployment steps are completed, you can start using the serverless project integrated with Twilio Studio. Follow the instructions provided in the project documentation or guide to interact with the deployed serverless application.
Congratulations! You have successfully set up and deployed the serverless project integrated with Twilio Studio. You can now leverage Twilio's communication capabilities within your serverless applications.