mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-21 09:50:35 +00:00
Implement document PATCH operation
This commit is contained in:
46
README.md
46
README.md
@@ -1,11 +1,13 @@
|
||||
# Cosmium
|
||||
|
||||
Cosmium is a lightweight Cosmos DB emulator designed to facilitate local development and testing. While it aims to provide developers with a solution for running a local database during development, it's important to note that it's not 100% compatible with Cosmos DB. However, it serves as a convenient tool for E2E or integration tests during the CI/CD pipeline. Read more about compatibility [here](docs/compatibility.md).
|
||||
Cosmium is a lightweight Cosmos DB emulator designed to facilitate local development and testing. While it aims to provide developers with a solution for running a local database during development, it's important to note that it's not 100% compatible with Cosmos DB. However, it serves as a convenient tool for E2E or integration tests during the CI/CD pipeline. Read more about compatibility [here](./docs/compatibility.md).
|
||||
|
||||
One of Cosmium's notable features is its ability to save and load state to a single JSON file. This feature makes it easy to load different test cases or share state with other developers, enhancing collaboration and efficiency in development workflows.
|
||||
|
||||
# Getting Started
|
||||
|
||||
### Installation via Homebrew
|
||||
|
||||
You can install Cosmium using Homebrew by adding the `pikami/brew` tap and then installing the package.
|
||||
|
||||
```sh
|
||||
@@ -23,10 +25,10 @@ You can download the latest version of Cosmium from the [GitHub Releases page](h
|
||||
|
||||
Cosmium is available for the following platforms:
|
||||
|
||||
* **Linux**: cosmium-linux-amd64
|
||||
* **macOS**: cosmium-darwin-amd64
|
||||
* **macOS on Apple Silicon**: cosmium-darwin-arm64
|
||||
* **Windows**: cosmium-windows-amd64.exe
|
||||
- **Linux**: cosmium-linux-amd64
|
||||
- **macOS**: cosmium-darwin-amd64
|
||||
- **macOS on Apple Silicon**: cosmium-darwin-arm64
|
||||
- **Windows**: cosmium-windows-amd64.exe
|
||||
|
||||
### Running Cosmium
|
||||
|
||||
@@ -37,11 +39,12 @@ cosmium -Persist "./save.json"
|
||||
```
|
||||
|
||||
Connection String Example:
|
||||
|
||||
```
|
||||
AccountEndpoint=https://localhost:8081/;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==;
|
||||
```
|
||||
|
||||
### Running Cosmos DB Explorer
|
||||
### Running Cosmos DB Explorer
|
||||
|
||||
If you want to run Cosmos DB Explorer alongside Cosmium, you'll need to build it yourself and point the `-ExplorerDir` argument to the dist directory. Please refer to the [Cosmos DB Explorer repository](https://github.com/Azure/cosmos-explorer) for instructions on building the application.
|
||||
|
||||
@@ -50,6 +53,7 @@ Once running, the explorer can be reached by navigating following URL: `https://
|
||||
### Running with docker (optional)
|
||||
|
||||
If you wan to run the application using docker, configure it using environment variables see example:
|
||||
|
||||
```sh
|
||||
docker run --rm \
|
||||
-e Persist=/save.json \
|
||||
@@ -66,24 +70,26 @@ To disable SSL and run Cosmium on HTTP instead, you can use the `-DisableTls` fl
|
||||
|
||||
### Other Available Arguments
|
||||
|
||||
* **-AccountKey**: Account key for authentication (default "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==")
|
||||
* **-DisableAuth**: Disable authentication
|
||||
* **-Host**: Hostname (default "localhost")
|
||||
* **-InitialData**: Path to JSON containing initial state
|
||||
* **-Persist**: Saves data to the given path on application exit (When `-InitialData` argument is not supplied, it will try to load data from path supplied in `-Persist`)
|
||||
* **-Port**: Listen port (default 8081)
|
||||
* **-Debug**: Runs application in debug mode, this provides additional logging
|
||||
- **-AccountKey**: Account key for authentication (default "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==")
|
||||
- **-DisableAuth**: Disable authentication
|
||||
- **-Host**: Hostname (default "localhost")
|
||||
- **-InitialData**: Path to JSON containing initial state
|
||||
- **-Persist**: Saves data to the given path on application exit (When `-InitialData` argument is not supplied, it will try to load data from path supplied in `-Persist`)
|
||||
- **-Port**: Listen port (default 8081)
|
||||
- **-Debug**: Runs application in debug mode, this provides additional logging
|
||||
|
||||
These arguments allow you to configure various aspects of Cosmium's behavior according to your requirements.
|
||||
|
||||
All mentioned arguments can also be set using environment variables:
|
||||
* **COSMIUM_ACCOUNTKEY** for `-AccountKey`
|
||||
* **COSMIUM_DISABLEAUTH** for `-DisableAuth`
|
||||
* **COSMIUM_HOST** for `-Host`
|
||||
* **COSMIUM_INITIALDATA** for `-InitialData`
|
||||
* **COSMIUM_PERSIST** for `-Persist`
|
||||
* **COSMIUM_PORT** for `-Port`
|
||||
* **COSMIUM_DEBUG** for `-Debug`
|
||||
|
||||
- **COSMIUM_ACCOUNTKEY** for `-AccountKey`
|
||||
- **COSMIUM_DISABLEAUTH** for `-DisableAuth`
|
||||
- **COSMIUM_HOST** for `-Host`
|
||||
- **COSMIUM_INITIALDATA** for `-InitialData`
|
||||
- **COSMIUM_PERSIST** for `-Persist`
|
||||
- **COSMIUM_PORT** for `-Port`
|
||||
- **COSMIUM_DEBUG** for `-Debug`
|
||||
|
||||
# License
|
||||
|
||||
This project is [MIT licensed](./LICENSE).
|
||||
|
||||
Reference in New Issue
Block a user