feat: Initialize Rust blog CMS project with Axum, Askama, SQLite, and DevContainer setup.

This commit is contained in:
2026-03-02 20:14:54 +00:00
commit 02709fbea1
9 changed files with 2238 additions and 0 deletions

38
README.md Normal file
View File

@@ -0,0 +1,38 @@
# Rust Blog CMS
A simple blog CMS built with Rust, Axum, Askama, and SQLite.
## Prerequisites
- [Rust & Cargo](https://rustup.rs/) (latest stable version)
## Configuration
1. Copy the `.env.example` file to create your local `.env` file:
```bash
cp .env.example .env
```
2. Open the `.env` file and set your environment variables:
- `PORT`: The port your server will listen on (default is `3000`).
- `DATABASE_URL`: The connection string for your SQLite database (default is `sqlite://data.db`).
## Database Setup
*If you are using the `sqlx` CLI, you can create the database with:*
```bash
cargo install sqlx-cli --no-default-features --features rustls,sqlite
sqlx database create
```
*(Optionally run migrations if any exist: `sqlx migrate run`)*
## Running the app
To start the server, simply run:
```bash
cargo run
```
Then, open your web browser and navigate to `http://localhost:3000` (or whichever port you configured).