Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

t-webber/unifsync-server-old

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server

Run this project

  1. Configure and setup diesel (see bellow).

  2. Add PORT and HOST to the .env.local file

    # .env.local
    PORT=8080
    HOST="localhost"
  3. If you want to secure the connection, you can activate de secured flag. You will need to add KEY (32 randoom characters) and NONCE (12 random characters) to your env.local:

    # .env.local
    PORT=8080
    HOST="localhost"
    KEY="azertyuiopqsdfghjklmwxcvbn123456"
    NONCE="1234567890AZ"
  4. Run the project with cargo run.

Seting up diesel

This guide gives you the minimum to run the project. For more information, see this file.

  1. Download the sqlite3 precompiled binaries:

    • On Windows: download sqlite3-dll-win-x64-*.zip from the sqlite download page. Extract the contents of the .zip file and add the folder to the PATH.
    • On Debian/Ubuntu: run sudo apt install libsqlite3-dev
    • On Fedora/Centos: run sudo dnf install sqlite-devel
  2. Install the diesel CLI with

    cargo install diesel_cli --no-default-features --features sqlite
  3. To create the database, run

    diesel setup
  4. Open diesel.toml and change the print_schema path to src/database/schema.rs.

  5. To perform a migration with the content of the schema, run

    diesel migration generate --diff-schema init
  6. Update your .gitignore file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages