chore: improve documentation local development guidelines
This commit is contained in:
+1
-36
@@ -5,42 +5,6 @@ We welcome contributions from the community! Please follow these guidelines to h
|
|||||||
## Code of Conduct
|
## 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.
|
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
|
## How to Contribute
|
||||||
|
|
||||||
### 1. Fork the Repository
|
### 1. Fork the Repository
|
||||||
@@ -64,6 +28,7 @@ git checkout -b fix/issue-description
|
|||||||
```
|
```
|
||||||
|
|
||||||
### 4. Develop Your Changes
|
### 4. Develop Your Changes
|
||||||
|
- Check [Local Development](docs/SETUP.md#local-development) guidelines
|
||||||
- Ensure changes match the project scope
|
- Ensure changes match the project scope
|
||||||
- Write clear commit messages
|
- Write clear commit messages
|
||||||
- Include tests for new functionality
|
- Include tests for new functionality
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[](https://hub.docker.com/repository/docker/sjdonado/bit)
|
[](https://hub.docker.com/r/sjdonado/bit)
|
||||||
[](https://hub.docker.com/repository/docker/sjdonado/bit)
|
[](https://hub.docker.com/r/sjdonado/bit)
|
||||||
[](https://hub.docker.com/repository/docker/sjdonado/bit)
|
[](https://hub.docker.com/r/sjdonado/bit)
|
||||||
|
|
||||||
# Bit URL Shortener
|
# Bit URL Shortener
|
||||||
|
|
||||||
|
|||||||
+39
-3
@@ -8,9 +8,9 @@ Options:
|
|||||||
--delete-user=USER_ID Delete a user by ID
|
--delete-user=USER_ID Delete a user by ID
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run it anywhere
|
## Run It Anywhere
|
||||||
|
|
||||||
### docker-compose
|
### Docker Compose
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose up
|
docker-compose up
|
||||||
@@ -19,7 +19,7 @@ docker-compose up
|
|||||||
# docker-compose exec -it app cli --create-user=Admin
|
# docker-compose exec -it app cli --create-user=Admin
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docker cli
|
### Docker CLI
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run \
|
docker run \
|
||||||
@@ -60,6 +60,42 @@ dokku ports:add bit https:443:4000
|
|||||||
# dokku run bit cli --create-user=Admin
|
# 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
|
## Benchmark
|
||||||
|
|
||||||
Conducted on a MacBook Air M2 with 16GB RAM.
|
Conducted on a MacBook Air M2 with 16GB RAM.
|
||||||
|
|||||||
Reference in New Issue
Block a user