Skip to content

HeinzDev/actix-basic-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust CRUD Project with Actix

This is a project aimed at creating a simple CRUD for users in Rust using the Actix framework.

Project Structure

  • main.rs: This is the main file to start the Actix server.

  • test/: In this folder, you'll find the test script using Curl to verify the API's functionality.

  • modules/: This directory contains route/operations folders for the CRUD.

Project Deploy

You can acces the API deploy link Here.

How to Use

  1. Make sure you have Rust installed on your machine.

  2. Clone this repository.

  3. Navigate to the project folder.

Then proceed to one of the 3 environments.

If your API still won't work, changing the Host bind address from '0.0.0.0' to '127.0.0.1' may resolve the problem.

Devel

  1. Run cargo run to start the Actix server.

  2. Use the test script in test/ to check the API's functionality.

Build

  1. Run cargo build --release

  2. Run ./target/release/actix-basic-api to initialize the API.

Docker image

To use the Docker Image you must change the Host API address to work properly.

  1. Build the docker image with docker build -t actix-basic-api .

  2. Run the container with docker run -p 8080:8080 actix-basic-api

And it's done!

About

simple crud made with actix

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published