{"id":22166437,"url":"https://github.com/alextanhongpin/insta-go","last_synced_at":"2025-03-24T16:24:54.695Z","repository":{"id":79115024,"uuid":"87097742","full_name":"alextanhongpin/insta-go","owner":"alextanhongpin","description":"Mock API Instagram with Golang","archived":false,"fork":false,"pushed_at":"2017-04-25T16:25:54.000Z","size":2816,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T21:54:18.733Z","etag":null,"topics":["golang","rest-api"],"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/alextanhongpin.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":"2017-04-03T16:45:45.000Z","updated_at":"2017-04-05T03:25:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd8dbfcc-a69c-49e6-ad22-f0990f9fa9cc","html_url":"https://github.com/alextanhongpin/insta-go","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/alextanhongpin%2Finsta-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alextanhongpin%2Finsta-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alextanhongpin%2Finsta-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alextanhongpin%2Finsta-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alextanhongpin","download_url":"https://codeload.github.com/alextanhongpin/insta-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245306094,"owners_count":20593837,"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":["golang","rest-api"],"created_at":"2024-12-02T05:19:30.041Z","updated_at":"2025-03-24T16:24:54.686Z","avatar_url":"https://github.com/alextanhongpin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Instago\n\nA modern Instagram created with Golang as the backend and Elm as the frontend.\n\nThe goal of the project is to understand how productive can it be to code an app using Golang. I simply choose Instagram for no particular reason. \n\nFor the database, I'll be using Postgres. \n\n\n## Architecture\n\n### What is the best way to store configs? \n\nAccording to the 12-Factor-App, configs should be stored in the environment variables. How does it apply in Golang?\n\n### What is the best practices to use Postgres with Golang?\n\nI'm still exploring this particular area. The current way is to just store a global sql context.\n\nThere are some issues that I encountered when working datetime conversion and postgres array in Golang.\n\n### Designing models\n\nC'mon, models should be fat. How can I make my models more useful?\n\n### Deployment\n\nDocker? Found a good tutorial [here](https://www.iron.io/an-easier-way-to-create-tiny-golang-docker-images/).\nRemember to call `godep save -r` before building a static binary with the name `your_binary_name`:\n\n```bash\n$ docker run --rm -it -v \"$GOPATH\":/gopath -v \"$(pwd)\":/app -e \"GOPATH=/gopath\" -w /app golang:1.4.2 sh -c 'CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags=\"-s\" -o your_binary_name'\n```\n\nBuilding the docker image is straightforward:\n```dockerfile\nFROM iron/base\nWORKDIR /app\n# copy binary into image\nCOPY hello /app/\nENTRYPOINT [\"./your_binary_name\"]\n```\n\nRun the dockerfile to build the image:\n\n```bash\n$ docker build -t treeder/go-hello-http .\n```\n\nNow run it:\n```bash\n$ docker run --rm -it -p 8080:8080 treeder/go-hello-http\n```\n\n\n## Current progress\n\nWatch me throw some css magic dust on this...\n![The start!](assets/01-the-beginning.jpg)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falextanhongpin%2Finsta-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falextanhongpin%2Finsta-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falextanhongpin%2Finsta-go/lists"}