mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Update README.md
This commit is contained in:
parent
8164d688cb
commit
c4ac81ea62
@ -6,7 +6,10 @@ etcd
|
||||
|
||||
### Setting up a node
|
||||
|
||||
```sh
|
||||
./etcd
|
||||
```
|
||||
|
||||
This will bring up a node, which will be listening on internal port 7001 (for server communication) and external port 4001 (for client communication)
|
||||
|
||||
Setting and Retrieving Values
|
||||
@ -96,7 +99,9 @@ curl http://127.0.0.1:4001/v1/keys/foo
|
||||
```
|
||||
You can expect the ttl is counting down and after 5 seconds you should see this,
|
||||
|
||||
```html
|
||||
404 page not found
|
||||
```
|
||||
|
||||
which indicates the key has expired and was deleted.
|
||||
|
||||
@ -155,8 +160,9 @@ curl http://127.0.0.1:4001/v1/testAndSet/testAndSet -d prevValue=two -d value=th
|
||||
This will try to test if the previous of the key is two, it is change it to three.
|
||||
|
||||
The response should be
|
||||
status code 400
|
||||
```html
|
||||
Test one==two fails
|
||||
```
|
||||
|
||||
which means testAndSet fails.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user