example-voting-app icon indicating copy to clipboard operation
example-voting-app copied to clipboard

Voting results issue

Open abbabe opened this issue 3 years ago • 0 comments

Hi guys, I have a problem about voting-app results. I cloned all files from git to my virtual ubuntu pc. And then I run with" docker compose up" . I can see on locolhost page. But I there is a problem about vote results. I clicked randomly cats, dogs but ı can see on the result page only 2 votes. And then when I clicked button cats ı saw message below.

"ERROR: duplicate key value violates unique constraint "votes_id_key" example-voting-app-db-1 | DETAIL: Key (id)=(e5160d95d27677e) already exists. "

I get only real result if ı close my browser. Every closing and then voting clicking , vote result is increasing.

How can I solve this problem or do the program run likes this ?

Finally , ı wanna ask one more question ? I also installed kubernates . But when ı insert "kubectl create namespace vote" , ı get a message below

"The connection to the server localhost:8080 was refused - did you specify the right host or port? "

Could you help me please ? Thanks in advance.

abbabe avatar Aug 10 '22 06:08 abbabe