This project is designed to handle contact form submissions. Upon receiving a submission, it performs the following tasks:
- Stores the contact form data into a database.
- Sends an email notification to the team.
- Sends a confirmation email to the user.
- Go SDK Version:
1.20
- Set Environment variables: Copy sample.env to .env and update the values
- Platform: DigitalOcean Serverless Functions. For more details, refer to the official documentation.
The project uses a project.yml
file for configuration. This file defines the structure and settings for the serverless function. For more information about the structure and details of project.yml
, see the official guide.
-
Connect to the Functions Namespace: Before deploying, you need to connect to the appropriate functions namespace. Use the following command:
doctl serverless connect <name-space>
-
Check Connection Status: To verify which namespace you're connected to, run:
doctl serverless status
-
Deploy the Project: To deploy the serverless function, navigate to the project's root directory and run:
doctl serverless deploy .
Ensure that the directory in the command above points to the root of the project.