A demo blog post engine in Rust, using Rocket and MongoDB

Overview

A demo blog post engine written in Rust, using Rocket and MongoDB

Quick Start

  • Setup a new MongoDB cluster https://cloud.mongodb.com/ create a new database and obtain the rust connection string (under Database/Connect) example (mongodb+srv://<user>:<password>@XXXX.mongodb.net/myFirstDatabase?retryWrites=true&w=majority)

  • Create a database rust_blog_engine

  • Add a collection authorization containing authorized users id (Google user id)

{
    "_id": "116710526826489061000",
    "email": "[email protected]",
    "name": "Nabil Hachicha"
}
  • Add a collection blogs which will persist our blog posts entries.

  • Setup a Google OAuth2 API and add the client_id and client_secret inside the Rocket.toml file.

  • Start the engine using cargo run and providing the MongoDB connection string

MDB_URL="mongodb+srv://<user>:<password>@XXXX.mongodb.net/myFirstDatabase?retryWrites=true&w=majority" cargo run 

Preview

Home

Login

Admin

New Blog

Edit Blog

You might also like...
Archibald is my attempt at learning Rust and writing a HTTP 1.1 web server.
Archibald is my attempt at learning Rust and writing a HTTP 1.1 web server.

Archibald To be a butler, is to be able to maintain an even-temper, at all times. One must have exceptional personal hygiene and look sharp and profes

Salvo is a powerful and simplest web server framework in Rust world
Salvo is a powerful and simplest web server framework in Rust world

Salvo is an extremely simple and powerful Rust web backend framework. Only basic Rust knowledge is required to develop backend services.

VRS is a simple, minimal, free and open source static web server written in Rust
VRS is a simple, minimal, free and open source static web server written in Rust

VRS is a simple, minimal, free and open source static web server written in Rust which uses absolutely no dependencies and revolves around Rust's std::net built-in utility.

A blazingly fast static web server with routing, templating, and security in a single binary you can set up with zero code. :zap::crab:
A blazingly fast static web server with routing, templating, and security in a single binary you can set up with zero code. :zap::crab:

binserve ⚡ 🦀 A blazingly fast static web server with routing, templating, and security in a single binary you can set up with zero code. 🔥 UPDATE: N

Host These Things Please - a basic http server for hosting a folder fast and simply

http Host These Things Please - a basic HTTP server for hosting a folder fast and simply Selected features See the manpage for full list. Symlinks fol

Simple and fast web server

see Overview Simple and fast web server as a single executable with no extra dependencies required. Features Built with Tokio and Hyper TLS encryption

A flexible web framework that promotes stability, safety, security and speed.

A flexible web framework that promotes stability, safety, security and speed. Features Stability focused. All releases target stable Rust. This will n

A library for simulating mouse and keyboard events

The Fat Controller TFC is a library for simulating mouse and keyboard events. This library was built for use by TFC-server, a server that allows for r

A starter template for actix-web projects that feels very Django-esque. Avoid the boring stuff and move faster.

Jelly A.K.A, the actix-web starter you probably wish you had. This is provided as-is, and anyone is free to extend it or rework it as they desire - ju

Owner
Nabil Hachicha
Nabil Hachicha
Server with Rust, Rocket, Diesel, Docker to create your own to-do-list

Installation Install Docker & Docker-Compose Then download the repository go to the root where the Dockerfile is and do: sudo docker-compose up sudo i

Lucas Aries 3 Aug 19, 2022
Dynamic routing system for Rocket

rocket_router Dynamic routing system for Rocket Caveats Each file should export only one route, named the same as the file itself. After adding a new

David Arsene 1 Oct 27, 2021
Rust + htmx + tailwind + nix + redb + twind demo web app

htmx sorta A demo project where I learn and play with my "Rust web stack": Rust Nix flakes for building and dev shell redb Rust local key-value store

Rustshop 19 Oct 5, 2023
A modern-looking, lightening fast, privacy respecting, secure, self-hostable meta search engine.

Websurfx A modern-looking, lightning-fast, privacy-respecting, secure meta search engine (pronounced as websurface or web-surface /wɛbˈsɜːrfəs/.) writ

neon_arch 16 May 8, 2023
The purpose of this example is to provide details as to how one would go about using GraphQL with the Rust Language.

Zero to GraphQL Using Rust The purpose of this example is to provide details as to how one would go about using GraphQL with the Rust Language. Thus,

Conrad Taylor 1 Jan 7, 2022
Fahrenheit-celsius converter using actix

fahrenheit-celsius-converter Simple http Fahrenheit/Celsius/Kelvin converter using actix-web. Note This is a toy project, not yet finished. It's not r

null 5 Nov 7, 2023
Create, share, fetch and model Atomic Data! This project consists of a graph database + server, a CLI and a rust library.

Create, share, fetch and model Atomic Data! This repo consists of three components: A library, a server and a CLI. atomic-server Status: Beta. Breakin

Joep Meindertsma 195 Dec 28, 2022
Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

Actix Web Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust Features Supports HTTP/1.x and HTTP/2 Streaming and pipelining

Actix 16.3k Jan 8, 2023
Sincere is a micro web framework for Rust(stable) based on hyper and multithreading

The project is no longer maintained! Sincere Sincere is a micro web framework for Rust(stable) based on hyper and multithreading. Style like koa. The

null 94 Oct 26, 2022
Completely OBSOLETE Rust HTTP library (server and client)

OBSOLETION NOTICE This library is DEAD. It was a useful experiment and is now being replaced under the scope of the Teepee (experimentation grounds at

Chris Morgan 390 Dec 1, 2022