{"id":18412637,"url":"https://github.com/benchkram/bob-quick-start","last_synced_at":"2025-04-12T23:47:08.271Z","repository":{"id":56717528,"uuid":"524026710","full_name":"benchkram/bob-quick-start","owner":"benchkram","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-21T09:25:37.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T23:47:05.792Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benchkram.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":"2022-08-12T09:20:53.000Z","updated_at":"2022-08-12T09:51:39.000Z","dependencies_parsed_at":"2023-01-18T16:46:27.794Z","dependency_job_id":null,"html_url":"https://github.com/benchkram/bob-quick-start","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/benchkram%2Fbob-quick-start","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benchkram%2Fbob-quick-start/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benchkram%2Fbob-quick-start/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benchkram%2Fbob-quick-start/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benchkram","download_url":"https://codeload.github.com/benchkram/bob-quick-start/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647254,"owners_count":21139081,"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-11-06T03:42:53.336Z","updated_at":"2025-04-12T23:47:08.244Z","avatar_url":"https://github.com/benchkram.png","language":"Go","readme":"# bob-quick-start\n\nTo quickly get started, clone our sample `Hello World` project:\n\n```shell\ngit clone git@github.com:benchkram/bob-quick-start.git\ncd bob-quick-start \n```\n\nInside `bob-quick-start`, you'll notice a `bob.yaml` file. This file, also called **Bobfile** contains the instructions\nfor all the build tasks of your project:\n\n```yaml\nbuild:\n  build:\n    input: |-\n      main.go\n      go.mod\n      go.sum\n    cmd: go build -o ./build/server main.go\n    target: /build/server\ndependencies:\n  - go_1_18\n```\n\nRunning `bob build` will build the entire project from scratch:\n\n```shell\nbob build\n\nBuilding nix dependencies...\nSucceeded building nix dependencies\nRunning task build with 0 dependencies\n\nbuild      \trunning task...\nbuild      \t...done\n\n● ● ● ●\nRan 1 tasks in 330ms \n  build              \t✔       \t(330ms)\n```\n\nThe first thing you might have noticed is that you didn't have to install Go for this application to work. bob takes\ncare of installing all your project dependencies by using [Nix](https://nixos.org/) under the hood. Nix has over **80 000 packages** to pick from so\nyou no longer need to rely on Docker containers to manage your environment.\n\nThe second thing to notice is that the binary for our server has been built inside `./build` directory. You can now run it:\n\n```shell\n./build/server \n```\n\nIf you go to [http://localhost:3333/](http://localhost:3333/) you should see `Hello World!`.\n\nIf you run `bob build` again, now it's much faster because bob will cache the build outputs. If the first build\ntook `330ms`\nnow the second build only took `1ms`.\n\n```shell\n$ bob build     \nBuilding nix dependencies...\nSucceeded building nix dependencies\nRunning task build with 0 dependencies\n\n● ● ● ●\nRan 1 tasks in 1 ms\n  build              \tcached  \n```\n\nLet's change the `main.go` file from `\"Hello, World!\"` to `\"Hello, Bob!\"`:\n\n```go\nfunc Hello(w http.ResponseWriter, r *http.Request) {\n  fmt.Fprint(w, \"Hello, Bob!\")\n}\n```\n\nNow when we run `bob build` again, we see the project is built again because `main.go` has changed:\n\n```shell\nBuilding nix dependencies...\nSucceeded building nix dependencies\nRunning task build with 0 dependencies\n\nbuild      \trunning task...\nbuild      \t...done\n\n● ● ● ●\nRan 1 tasks in 341 ms\n  build              \t✔       \t(340ms)\n```\n\nbob figured out that the source code has changed and rebuilt out binary server. \n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenchkram%2Fbob-quick-start","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenchkram%2Fbob-quick-start","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenchkram%2Fbob-quick-start/lists"}