Skip to content

Wooker/foodie-back

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

foodie-back

How to build

Rust installation

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Database setup

Create the database on local postgres server and provide a link to it in .env file in the root directory of the project, like so:

DATABASE_URL=postgres://{username}:{password}@localhost/{database_name}

where you replace {username}, {password}, and {database_name} with your own parameters.

Diesel setup

Diesel is an ORM tool with its own CLI for creating schemas and migration scripts.

cargo install diesel_cli --no-default-features --features postgres

All of the migration scripts present in migrations directory. To apply them run:

diesel migration run

Diesel will use the link you provided in .env file to connect to the database. If you want to reset the database and apply the migrations again, use:

diesel database reset

Build the project

cargo build

Run

cargo run

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published