-
Notifications
You must be signed in to change notification settings - Fork 0
Local Development Environment
zion edited this page Jan 19, 2025
·
1 revision
Shelf uses MongoDB 8.0 and makes use of transactions. To set up a database with a replica set, install run-rs:
npm install run-rs -gThen, run the following command to start the replica set:
run-rsThe server will be running on ports 27017, 27018, and 27019. The connection string to connect to the replica set is:
mongodb://localhost:27017,localhost:27018,localhost:27019/shelf?replicaSet=rsrun-rs clears the database every time it starts by default. To override this behaviour, use the --keep (-k) flag.
run-rs --keepTo stop the server, hit Ctrl+C.
Install dependencies:
npm installRun development server:
npm run dev