Example for using postgres with rocket

I am still pretty new to Rocket and Rust and I want to make a simple app with a DB. The rocket example shows using SQLite but I would like to use Postgres and I haven't been able to work out how to get this working as the postgres example on the Diesel website is quite different to the SQLite example on the rocket docs.

Does anyone know of a simple example app using rocket and postgres or somewhere I could look to learn more?

I had the same issue setting up. It could be difficult to parse through the docs! I published this repo a few months ago - perhaps it can be of some use. It uses Diesel, Rocket, Postgresql, and database pooling.

https://github.com/resamplr/resamplr-web

I also have a vagrant box with rust/diesel/Postgresql already set up if that's your sort of thing.

1 Like

I have been working on a blog that uses Postgresql and Rocket
https://github.com/vishusandy/blogr

1 Like