# Running a development build

### Run server

Run with default settings:

    npm run start-server

Run with custom port:

    TRILIUM_PORT=8082 npm run start-server

### Run Electron

Rebuild `better-sqlite3` dependency:

    npm run switch-electron

Then run Electron:

    npm run start-electron

To run Electron using the same data directory as the production version:

    npm run start-electron-no-dir

When done, switch back the `better-sqlite3` dependency:

    npm run switch-server