{"id":15693003,"url":"https://github.com/code-hex/why-need-validation-on-the-backend","last_synced_at":"2025-09-13T01:09:47.069Z","repository":{"id":71655597,"uuid":"412134572","full_name":"Code-Hex/Why-need-validation-on-the-backend","owner":"Code-Hex","description":"Why need validation on the backend?","archived":false,"fork":false,"pushed_at":"2021-09-30T16:14:01.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T14:39:04.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Code-Hex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-30T16:11:32.000Z","updated_at":"2021-09-30T16:15:16.000Z","dependencies_parsed_at":"2023-05-13T09:15:40.489Z","dependency_job_id":null,"html_url":"https://github.com/Code-Hex/Why-need-validation-on-the-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2FWhy-need-validation-on-the-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2FWhy-need-validation-on-the-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2FWhy-need-validation-on-the-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2FWhy-need-validation-on-the-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Code-Hex","download_url":"https://codeload.github.com/Code-Hex/Why-need-validation-on-the-backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246320138,"owners_count":20758407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T18:40:52.074Z","updated_at":"2025-03-30T12:43:53.190Z","avatar_url":"https://github.com/Code-Hex.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Why need validation on the backend?\n\nThis project is an appendix for my blog [article (about validation)](https://codehex.dev/notes/about_validation).\n\nThis application has a scenario.\n\n\u003e Once upon a time, There was a war between the banana faction and the orange faction. One day, somebody said, “I’ve developed the voting application to prove which is better fruits!”\n\nNow, which one will you vote for? Voting for any other fruit is a sin.\n\n\u003cimg width=\"375\" alt=\"screenshot\" src=\"https://user-images.githubusercontent.com/6500104/135491289-bef4db50-103e-4312-a31b-59c9d0474f70.png\"\u003e\n\n## How to setup and runs this?\n\n```\ngo run main.go\n```\n\nand go to `http://127.0.0.1:1323` with your browser.\n\n## Cheat\n\nYou can vote for other fruit this way.\n\n```\n$ curl 'http://127.0.0.1:1323/vote' -H 'Content-Type: application/x-www-form-urlencoded' --data-raw 'fruit=apple'\n```\n\n## Refs\n\n- https://stackoverflow.com/a/162579","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hex%2Fwhy-need-validation-on-the-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-hex%2Fwhy-need-validation-on-the-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hex%2Fwhy-need-validation-on-the-backend/lists"}