{"id":22724528,"url":"https://github.com/binghuan/simple_file_storage_server","last_synced_at":"2026-04-30T01:39:45.697Z","repository":{"id":49338617,"uuid":"432367172","full_name":"binghuan/simple_file_storage_server","owner":"binghuan","description":"Coding quest from Woven Planet","archived":false,"fork":false,"pushed_at":"2021-12-18T18:41:52.000Z","size":19857,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-05T00:42:52.134Z","etag":null,"topics":["assignment","backend","go","javascript","server","take-home-test","webapp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binghuan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-27T04:25:40.000Z","updated_at":"2024-04-12T15:20:48.000Z","dependencies_parsed_at":"2022-08-26T08:00:33.143Z","dependency_job_id":null,"html_url":"https://github.com/binghuan/simple_file_storage_server","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/binghuan%2Fsimple_file_storage_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binghuan%2Fsimple_file_storage_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binghuan%2Fsimple_file_storage_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binghuan%2Fsimple_file_storage_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binghuan","download_url":"https://codeload.github.com/binghuan/simple_file_storage_server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246254149,"owners_count":20747949,"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":["assignment","backend","go","javascript","server","take-home-test","webapp"],"created_at":"2024-12-10T15:06:59.647Z","updated_at":"2026-04-30T01:39:45.651Z","avatar_url":"https://github.com/binghuan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](./frontend/images/icon-256.jpg)  \nSimple File Storage Server\n================================================\n\nThis is a simple file storage server.   \nUser can upload file,  delete file and list file on the server. \n\nIf you want to build and run the server locally, here is the user guide. \n\n## Table of Contents\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n- [Simple File Storage Server](#simple-file-storage-server)\n  - [Table of Contents](#table-of-contents)\n  - [On Server Side](#on-server-side)\n    - [Prepare your Go Environment](#prepare-your-go-environment)\n    - [Start Back-End Server](#start-back-end-server)\n  - [On Front-End Side](#on-front-end-side)\n    - [Start Web Server to interact with server](#start-web-server-to-interact-with-server)\n  - [Control flow for web app](#control-flow-for-web-app)\n  - [How to run test cases](#how-to-run-test-cases)\n  - [Demo on WebSite](#demo-on-website)\n  - [How to Use CLI for Testing.](#how-to-use-cli-for-testing)\n  - [Demo on CLI](#demo-on-cli)\n  - [Use Docker to start the server](#use-docker-to-start-the-server)\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## On Server Side\n### Prepare your Go Environment\nDownload and install  \n\u003chttps://go.dev/doc/install\u003e  \n\n### Start Back-End Server\nStart the go server and listen the port 8080\n```shell\ncd backend;\ngo run main.go\n```\n\nHere is the APIs provided by Server \n![](./APIs.png)\n\n## On Front-End Side\n### Start Web Server to interact with server \nYou can use your favorite http-server.\n(in this case, I use this https://formulae.brew.sh/formula/http-server)\n```\ncd frontend;\nhttp-server --cors;\n```\nAfter launching the web server, you can visit the website. \n![](./webpage.png)  \nNow, you can choose file to upload.  \n\nOnce you have uploaded a file (ex: mylogo.png), \nyou can see there will be a file on the list. \n![](./webpage_list.png)\n\n## Control flow for web app\n![](./control_flow_for_web_app.png)\n\n## How to run test cases\n```shell\ncd backend; \ngo test -v ./\n```\n![](./demo_testcases.png)\n\n## Demo on WebSite\n![](./demo_20211127.gif)\n\n## How to Use CLI for Testing. \n- Command to Upload file to server \n```shell\ncurl -v -F filename=image.jpg \\\n    -F file2upload=@mylogo.png \\\n    http://localhost:8080/files/mylogo.png\n```\n- Command to list files on server\n```shell\ncurl --location --request GET 'http://localhost:8080/files'\n## Sample of output \n## {\"files\":[\"mylogo.png\"]}\n```\n- Command to delete files on server \n```shell\ncurl --location --request DELETE 'http://localhost:8080/files/mylogo.png'\n```\n## Demo on CLI\n![](./demo_cli.gif)\n\n## Use Docker to start the server\nInput following command in the root folder.\nThen, visit the website \"http://localhost:8081\"\n```shell\ndocker-compose up -d\n```\n![](./demo_docker-compose.gif)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinghuan%2Fsimple_file_storage_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinghuan%2Fsimple_file_storage_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinghuan%2Fsimple_file_storage_server/lists"}