Rust Axum+SQLx Sample

Overview

rust-axum-sqlx-sample

Install

git clone https://github.com/web3ten0/rust-axum-sqlx-1.git
cd rust-axum-sqlx-1/local
docker-compose up -d
sh scripts/exec_init_db

Migration

cd local/scripts
sh migrate add -r users
sh migrate run
sh migrate revert

Swagger

swagger-uiのURL

OpenAPIのBundle方法

> npm install -g @apidevtools/swagger-cli
> swagger-cli bundle -o openapi.yaml -t yaml openapi/base.yaml

bundle script

  • 上記のswagger-cliコマンドを書いた。下記のopenapi/bundleを実行したら、openapi.yamlが最新状態になる。
> sh openapi/bundle
You might also like...
Demo of Rust and axum web framework

Demo of Rust and axum web framework Demonstration of: Rust: programming language that focuses on reliability and stability. axum: web framework that f

Rust Axum Full Course code.

Rust Axum Full Course source code. YouTube Full Course: https://youtube.com/watch?v=XZtlD_m59sM&list=PL7r-PXl6ZPcCIOFaL7nVHXZvBmHNhrh_Q MIT OR Apache,

JWT Authentication in Rust using Axum Framework

Are you interested in building a secure authentication system for your Rust web application? Look no further than the Axum framework and JSON Web Tokens (JWTs)! Axum is a fast and scalable Rust web framework that provides a reliable and efficient platform for developing microservices and APIs.

This is a simple Api template for Rust ( Axum framework )

Axum-Rust-Rest-Api-Template This project is an open source Rest Api Template built with Rust's Axum framework. Why this project? I have been learning

Rust server with Axum, GraphQL and SurrealDb
Rust server with Axum, GraphQL and SurrealDb

📜️ Article on my web Axum server, Async-GraphQl, SurrealDB template Run without any prior setup, DB is in memory: cargo run To use routes other than

The goal of this repository is to have a real world template of a Rust backend using Axum, Diesel, etc.

Axum Diesel Real-World Example A modular Rust backend template based on the Domain-Driven Design (DDD) architecture, utilizing the Axum and Diesel fra

Axum web framework tutorial for beginners.

Axum Tutorial For Beginners Hello web developers! This tutorial will cover how to write simple web applications in rust with axum framework. If you ar

Yew + Axum + blog = Yab

Yew + Axum + blog = Yab

🪪 Session-based user authentication for Axum.

axum-login 🪪 Session-based user authentication for Axum. 🎨 Overview axum-login is a Tower middleware providing session-based user authentication for

Comments
  • #1 画像アップロード機能がちょっとできた

    #1 画像アップロード機能がちょっとできた

    #1 について下記が一応できました。

    • Swaggerから画像アップロード(POST, JSON, base64)
      • 画像アップロード方法は、 multipart/form-data のみに対応している状況です。
    • ファイルサイズ、ファイルタイプ等をチェック
    • リサイズ、サムネイル作成
      • 今はMax300x300の固定サイズでサムネイルを作成しているだけです。
    opened by web3ten0 1
  • 画像アップロード機能

    画像アップロード機能

    • [x] Swaggerから画像アップロード(POST, JSON, base64)
    • [x] ファイルサイズ、ファイルタイプ等をチェック
    • [x] リサイズ、サムネイル作成
    • [ ] Google Cloud Storageに保存
    • [ ] URLをDBに保存
    • [ ] テストを作成(サイズ・タイプチェック、リサイズ、サムネイル作成)
    opened by web3ten0 0
Owner
web3ten0
web3ten0
axum-serde is a library that provides multiple serde-based extractors and responders for the Axum web framework.

axum-serde ?? Overview axum-serde is a library that provides multiple serde-based extractors / responses for the Axum web framework. It also offers a

GengTeng 3 Dec 12, 2023
A newsletter with actix-web and sqlx-postgres

Newsletter backend Health check: production Pre-requisites You'll need to install: Rust Docker There are also some OS-specific requirements. Windows c

Nadeem Bhati 4 Dec 10, 2022
A simple tool to test sqlx with postgres. It will automatically create a database and drop it after the test.

sqlx-db-tester This a tool to test sqlx with postgres. It only supports tokio runtime at this moment. How to use it You should first create a TestDb d

Tyr Chen 4 Nov 29, 2022
Sample serverless application written in Rust

This is a simple serverless application built in Rust. It consists of an API Gateway backed by four Lambda functions and a DynamoDB table for storage.

AWS Samples 165 Jan 8, 2023
Learning Rust: Sample App

mars_calc The App runs on rust takes inpit weight in kg of earth and returns the weight on mars My first rust App Ownership Rules First, let’s take a

Koti Syamala 0 Dec 24, 2021
Sample code of Yew (0.18). Something like a PuyoPuyo.

RusRus Requirements Docker Depend on Yew ver 0.18.0 Usase docker build -t rusrus . # start serve docker run -p 8080:8080 --rm -it -v $(pwd):/app -w /

null 5 Jan 10, 2022
This repository contains the sample code for Rainer Stropek's talk at Eurorust 2022.

Building Web APIs with Rust - State of the Union Introduction This repository contains the sample code for Rainer Stropek's talk at Eurorust 2022. The

Rainer Stropek 24 Feb 9, 2023
Sample Artemis bot to fill UniswapX orders using on-chain liquidity

UniswapX Atomic Filler This is a sample Artemis bot that fills UniswapX orders atomically using Uniswap v2 and v3 liquidity. Feel free to fork and mod

null 102 Jul 25, 2023
Rust/Axum server implementation with PCR(Prisma Client Rust)

Realworld Rust Axum Prisma This project utilizes Rust with the Axum v0.7 framework along with the Prisma Client Rust to build a realworld application.

Neo 3 Dec 9, 2023
Experiments with Rust CRDTs using Tokio web application framework Axum.

crdt-genome Synopsis Experiments with Rust CRDTs using Tokio web application framework Axum. Background Exploring some ideas of Martin Kleppmann, part

dougfort 3 Mar 18, 2022