Update README.md to improve configuration and usage instructions
- Added spacing for better readability in the Etcd, MongoDB, Authentication, and Installation sections. - Corrected the reference from SocketClient to SocketUser in the Adding New Features section. - Enhanced the Troubleshooting section with a verification test for etcd.
This commit is contained in:
parent
e2eb240a06
commit
110f6d9a57
13
README.md
13
README.md
@ -30,6 +30,7 @@ A WebSocket microservice for FarmControl that handles real-time communication an
|
||||
The application uses `config.json` for configuration. Update the following sections:
|
||||
|
||||
### Etcd Configuration
|
||||
|
||||
```json
|
||||
{
|
||||
"database": {
|
||||
@ -42,6 +43,7 @@ The application uses `config.json` for configuration. Update the following secti
|
||||
```
|
||||
|
||||
### MongoDB Configuration
|
||||
|
||||
```json
|
||||
{
|
||||
"database": {
|
||||
@ -53,6 +55,7 @@ The application uses `config.json` for configuration. Update the following secti
|
||||
```
|
||||
|
||||
### Authentication Configuration
|
||||
|
||||
```json
|
||||
{
|
||||
"auth": {
|
||||
@ -70,11 +73,13 @@ The application uses `config.json` for configuration. Update the following secti
|
||||
## Running the Application
|
||||
|
||||
### Development
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Production
|
||||
|
||||
```bash
|
||||
npm start
|
||||
```
|
||||
@ -84,6 +89,7 @@ npm start
|
||||
### Installation
|
||||
|
||||
#### Using Docker
|
||||
|
||||
```bash
|
||||
docker run -d --name etcd \
|
||||
-p 2379:2379 \
|
||||
@ -95,19 +101,23 @@ docker run -d --name etcd \
|
||||
```
|
||||
|
||||
#### Using Homebrew (macOS)
|
||||
|
||||
```bash
|
||||
brew install etcd
|
||||
etcd
|
||||
```
|
||||
|
||||
#### Using apt (Ubuntu/Debian)
|
||||
|
||||
```bash
|
||||
sudo apt-get install etcd
|
||||
sudo systemctl start etcd
|
||||
```
|
||||
|
||||
### Verification
|
||||
|
||||
Test that etcd is running:
|
||||
|
||||
```bash
|
||||
curl http://localhost:2379/version
|
||||
```
|
||||
@ -139,6 +149,7 @@ The service exposes WebSocket endpoints for:
|
||||
## Development
|
||||
|
||||
### Project Structure
|
||||
|
||||
```
|
||||
src/
|
||||
├── auth/ # Authentication logic
|
||||
@ -152,7 +163,7 @@ src/
|
||||
### Adding New Features
|
||||
|
||||
1. **Database operations**: Use the `etcdServer` instance for etcd operations
|
||||
2. **WebSocket events**: Extend the `SocketClient` class
|
||||
2. **WebSocket events**: Extend the `SocketUser` class
|
||||
3. **Authentication**: Extend the `KeycloakAuth` class
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user