Skip to content

Backend made in Rust 🦀, containing 3 contact forms stored in the Postgresql database and another for resumes sent via email.

Notifications You must be signed in to change notification settings

Ott-cop/ocian-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ocian-Rust!

Example of backend for study using the company Ocian - Barra Bonita, as a brand.

Backend 100% made in Rust 🦀 with Actix-Web, using less than 5 MB of RAM and high speed! 🚀

This project contains 3 contact forms stored in the Postgresql database and another for resumes sent via email.


Build

To compile the project, download the repository and run the following command:

$ cargo run --release

Create the .env file in the project root with the following example information:

DATABASE_HOST="yourserver.com"
DATABASE_PORT="5432"
DATABASE_NAME="your_database_name"
DB_USER="your_database_user"
DB_PASSWORD="your_database_password"

HOST="smtp.gmail.com"
PORT=587
USERNAME="[email protected]"
PASSWORD="your_smtp_account_password"
EMAIL="[email protected]"

Remembering that the information above is TOTALLY an example, so it is possible to use any other SMTP server, for example.


Endpoints


  -> Json
  {
    "name": "Claudio Oswaldo",
    "email": "[email protected]",
    "phone": "(14) 984205190",
    "subject": "I would like to make a proposal!",
    "message": "Proposal..."
  }


  -> Json
  {
    "name": "Claudio Oswaldo",
    "email": "[email protected]",
    "phone": "(14) 984205190",
    "subject": "I would like to get in touch!",
    "message": "Contact..."
  }


  -> Multipart/form-data
  
    "name": "Claudio Oswaldo",
    "email": "[email protected]",
    "phone": "(14) 984205190",
    "file": yourfile.pdf/.docx/.word,
    "message": "Contact..."


  -> Json
  {
    "name": "Claudio Oswaldo",
    "email": "[email protected]",
    "phone": "(14) 984205190",
    "subject": "I need help from support!",
    "message": "I need help..."
  }

About

Backend made in Rust 🦀, containing 3 contact forms stored in the Postgresql database and another for resumes sent via email.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages