From a2dd5c0be3e80363ed2b0e40c9d4ba4f62772ba3 Mon Sep 17 00:00:00 2001 From: Unbewohnte Date: Thu, 23 Sep 2021 09:53:12 +0300 Subject: [PATCH] Changed default port to the same as in README, fixed a typo --- README.md | 2 +- main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ccf751a..7ea5922 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Implemented: `curl localhost:8000/randomdata` - to get EVERYTHING (obviously a bad idea if you have lots of data) `curl localhost:8000/randomdata -H "content-type:application/json" -d '{"title":"This is a title","text":"This is a text"}' -X POST` - to create a new RandomData (IDs are created automatically from 1-∞) `curl localhost:8000/randomdata/1` - to get the first RandomData you`ve created -`curl localhost:8000/randomdata/1 -H "content-type:application/json" -d {"title":"This is an updated title","text":"This is an updated text"}' -X PUT` - to update the first RandomData +`curl localhost:8000/randomdata/1 -H "content-type:application/json" -d '{"title":"This is an updated title","text":"This is an updated text"}' -X PATCH` - to update the first RandomData `curl localhost:8000/randomdata/1 -X DELETE` - to delete the first RandomData --- diff --git a/main.go b/main.go index 8167b0d..b6c60f5 100644 --- a/main.go +++ b/main.go @@ -12,7 +12,7 @@ import ( ) var ( - port *uint = flag.Uint("port", 8080, "Specifies a port on which the helping page will be served") + port *uint = flag.Uint("port", 8000, "Specifies a port on which the helping page will be served") dbname string = "database.db" tableName string = "randomdata" )