Skip to content

mephi-ut/diesel_demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diesel Demo

This is the code from the Diesel Getting Started Guide.

Quick start (Debian/Ubuntu)

Install postgres:

$ sudo apt-get install postgresql

Setup postgres:

$ sudo -u postgres psql

postgres=# CREATE DATABASE test;
CREATE DATABASE

postgres=# CREATE USER test WITH PASSWORD 'pass';
CREATE ROLE

postgres=# GRANT ALL PRIVILEGES ON DATABASE test TO test;
GRANT

Try the demo:

$ cargo install diesel_cli

$ git clone https://github.com/sgrif/diesel_demo

$ cd diesel_demo

$ export DATABASE_URL=postgres://test:pass@localhost:5432/test

$ ~/.cargo/bin/diesel migration run

$ cargo build

$ ./target/debug/write_post

About

Code from the getting started guide

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 100.0%