chore: improve documentation local development guidelines

This commit is contained in:
sjdonado
2025-02-07 17:50:10 +01:00
parent d55dbe0471
commit 702491cb39
3 changed files with 43 additions and 42 deletions
+1 -36
View File
@@ -5,42 +5,6 @@ We welcome contributions from the community! Please follow these guidelines to h
## Code of Conduct
This project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you agree to uphold its terms.
### Requirements
- Crystal 1.0+
- Shards package manager
- SQLite3
## Local Development
- linux
```bash
sudo apt-get update && sudo apt-get install -y crystal libssl-dev libsqlite3-dev
```
- macos
```bash
brew tap amberframework/micrate
brew install micrate
```
## Run
```bash
shards run bit
```
- Generate the `X-Api-Key`
```bash
shards run cli -- --create-user=Admin
```
- Run tests
```bash
ENV=test crystal spec
```
## How to Contribute
### 1. Fork the Repository
@@ -64,6 +28,7 @@ git checkout -b fix/issue-description
```
### 4. Develop Your Changes
- Check [Local Development](docs/SETUP.md#local-development) guidelines
- Ensure changes match the project scope
- Write clear commit messages
- Include tests for new functionality
+3 -3
View File
@@ -1,6 +1,6 @@
[![Docker Pulls](https://img.shields.io/docker/pulls/sjdonado/bit.svg)](https://hub.docker.com/repository/docker/sjdonado/bit)
[![Docker Stars](https://img.shields.io/docker/stars/sjdonado/bit.svg)](https://hub.docker.com/repository/docker/sjdonado/bit)
[![Docker Image Size](https://img.shields.io/docker/image-size/sjdonado/bit/latest)](https://hub.docker.com/repository/docker/sjdonado/bit)
[![Docker Pulls](https://img.shields.io/docker/pulls/sjdonado/bit.svg)](https://hub.docker.com/r/sjdonado/bit)
[![Docker Stars](https://img.shields.io/docker/stars/sjdonado/bit.svg)](https://hub.docker.com/r/sjdonado/bit)
[![Docker Image Size](https://img.shields.io/docker/image-size/sjdonado/bit/latest)](https://hub.docker.com/r/sjdonado/bit)
# Bit URL Shortener
+39 -3
View File
@@ -8,9 +8,9 @@ Options:
--delete-user=USER_ID Delete a user by ID
```
## Run it anywhere
## Run It Anywhere
### docker-compose
### Docker Compose
```bash
docker-compose up
@@ -19,7 +19,7 @@ docker-compose up
# docker-compose exec -it app cli --create-user=Admin
```
### Docker cli
### Docker CLI
```bash
docker run \
@@ -60,6 +60,42 @@ dokku ports:add bit https:443:4000
# dokku run bit cli --create-user=Admin
```
## Local Development
### Requirements
- Crystal 1.12+
- Shards package manager
- SQLite3
- linux
```bash
sudo apt-get update && sudo apt-get install -y crystal libssl-dev libsqlite3-dev
```
- macos
```bash
brew tap amberframework/micrate
brew install micrate
```
### Install Shards and Run
```bash
shards run bit
```
- Generate the `X-Api-Key`
```bash
shards run cli -- --create-user=Admin
```
- Run tests
```bash
ENV=test crystal spec
```
## Benchmark
Conducted on a MacBook Air M2 with 16GB RAM.