Skip to content

MontyCoder0701/axum-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

axum-starter

This is a simple starter repository for axum projects.
Use it for hackathons or external projects as a boilerplate — clone and customize as needed.

What's Included

GitHub Actions

  • Release Please – automated release management
  • Dependabot – automatic dependency updates
  • Dependabot Validation - automatic build check for dependabot PRs
  • CI – basic continuous integration for build, lint checks (clippy)

Database

Notice

If you're using Dependabot, ensure the following setting is enabled:

Settings → Actions → General → Allow GitHub Actions to create and approve pull requests

How to run local server

Add and place .env in root directory. Fill in appropriate values for each.

DATABASE_URL=

Install Diesel

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/diesel-rs/diesel/releases/latest/download/diesel_cli-installer.sh | sh

Run initial setup

diesel setup

Run local server.

cargo run

Server is running on http://localhost:3200.

Migrations

Generate migration

diesel migration generate --diff-schema {migration_name}

Run migration

diesel migration run

Revert migration with

diesel migration revert

Redo migration with

diesel migration redo

After changing schema, apply to migration

diesel migration generate --diff-schema {migration_name}

Troubleshooting

diesel-rs/diesel#1286

Make sure to setup system variables for MySQL in Windows.

Write appropriate version number in {version}

MYSQLCLIENT_LIB_DIR=C:\Program Files\MySQL\MySQL Server {version}\lib

MYSQLCLIENT_VERSION={version}

About

Boilerplate including most things you need in axum

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages