A simple rust electerm data sync server.
git clone [email protected]:electerm/electerm-sync-server-rust.git
cd electerm-sync-server-rust
# create env file, then edit .env
cp sample.env .env
cargo run
# would show something like
# server running at http://127.0.0.1:7837
# in electerm sync settings, set custom sync server with:
# server url: http://127.0.0.1:7837
# Then you can use http://127.0.0.1:7837/api/sync as API Url in electerm custom sync
# JWT_SECRET: your JWT_SECRET in .env
# JWT_USER_NAME: one JWT_USER in .envcargo run runs the server in debug mode. For production deployment:
# Build optimized release binary
cargo build --release
# Run the production binary
./target/release/electerm-sync-rust-servercargo test -- --test-threads=1Just take src/file_store.rs as an example, write your own read/write method
MIT