mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
1.8 KiB
1.8 KiB
Contributing to Lysand
Thank you for your interest in contributing to Lysand! We welcome contributions from everyone, regardless of their level of experience or expertise.
Getting Started
To get started, please follow these steps:
- Fork the repository, clone it on your local system and make your own branch
- Install the Bun runtime:
curl -fsSL https://bun.sh/install | bash
- Run
bun installin the project directory to install the dependencies
bun install
You will need a running PostgreSQL database for the next step
If you don't have a running PostgreSQL instance, you can use the following
docker-compose.ymlfile to start one:services: db: image: postgres:13-alpine restart: always init: true environment: { POSTGRES_USER: fediproject, POSTGRES_PASSWORD: fediproject, POSTGRES_DB: fediproject } ports: - 5432:5432 volumes: - ./data:/var/lib/postgresql/data
- Copy the
config/config.example.tomlfile toconfig/config.tomland change the database connection values to your own Postgres instance
For the example above, the values would be:
[database] host = "localhost" port = 5432 username = "fediproject" password = "fediproject" database = "fediproject"
- Fill in the rest of the config file with your own configuration (you can leave most things to the default)
Testing your changes
To start the live server on the address and port specified on the config file, run:
bun dev
If your port number is lower than 1024, you may need to run the command as root.
Running tests
To run the tests, run:
bun test
The tests are located in the tests/ directory and follow a Jest-like syntax.