Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TimurRin committed Dec 11, 2024
1 parent 5c5b11d commit df6386d
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

> **DISCLAIMER**: This project is not production ready. All versions below 1.0.0 should be considered unstable
SnapCRUD is a simple tool that lets you manage your database directly in your web browser. It's great for projects that need a quick admin panel or a way for non-technical users to manage simple data.

To get started, you only need to specify what tables and columns should be displayed and edited.

Currently, it supports MySQL only.

## Installation

### npm
Expand All @@ -10,6 +16,56 @@
npm install snapcrud
```

or

```bash
npm install -g snapcrud
```

## Configuration

Environmental variables for credentials:

```properties
SNAPCRUD_DB_HOST=host
SNAPCRUD_DB_PORT=port
SNAPCRUD_DB_USER=user
SNAPCRUD_DB_PASSWORD=pass
SNAPCRUD_DB_NAME=database
SNAPCRUD_HOST=host
SNAPCRUD_PORT=port
```

JSON file for tables setup:

```json
{
"displayAllTables": false,
"tables": [
{
"name": "table1",
"displayAllColumns": false,
"visibleColumns": ["id"],
"editableColumns": ["display_name"]
},
{
"name": "table2",
"displayAllColumns": true
}
]
}
```

## Usage

As a standalone web-server:

> WARNING! It doesn't include any auth workflow, your data and the web-server are directly exposed to the Internet. Make sure you've done extra measures to protect the web-server.
```bash
npx snapcrud -c /path/to/config.json
```

## Contributing

Visit [`CONTRIBUTING.md`](CONTRIBUTING.md).
Expand Down

0 comments on commit df6386d

Please sign in to comment.