{"id":24903719,"url":"https://github.com/ntrv3390/go-crud","last_synced_at":"2026-05-15T08:11:00.812Z","repository":{"id":274030182,"uuid":"921682124","full_name":"Ntrv3390/go-crud","owner":"Ntrv3390","description":"Basic crud operations in golang with postgresql and programmatic database migrations.","archived":false,"fork":false,"pushed_at":"2025-01-28T05:30:19.000Z","size":7704,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T22:31:41.323Z","etag":null,"topics":["crud","go","golang","postgresql","rest-api"],"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/Ntrv3390.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-24T12:15:25.000Z","updated_at":"2025-01-28T05:42:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"acf87487-bcc9-46da-ac59-69e70f28302f","html_url":"https://github.com/Ntrv3390/go-crud","commit_stats":null,"previous_names":["ntrv3390/go-crud"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ntrv3390%2Fgo-crud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ntrv3390%2Fgo-crud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ntrv3390%2Fgo-crud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ntrv3390%2Fgo-crud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ntrv3390","download_url":"https://codeload.github.com/Ntrv3390/go-crud/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245916742,"owners_count":20693400,"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":["crud","go","golang","postgresql","rest-api"],"created_at":"2025-02-01T22:30:44.979Z","updated_at":"2026-05-15T08:11:00.767Z","avatar_url":"https://github.com/Ntrv3390.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CRUD with go and postgres\n\n## Prerequisites\n\nThe project uses go language hence you need to install it. You can install golang from this url -\u003e \u003cmark\u003e[Install GoLang](https://go.dev/doc/install)\u003c/mark\u003e.\nIn this project I have used postgreSQL for database. Based on your requirements you can use any of the database you're comfortable with and can remove the postgreSQL dependencies and add your database dependencies to it. If you want to continue using postgreSQL just install it from this url -\u003e \u003cmark\u003e[Install PostgrSQL](https://www.postgresql.org/download)\u003c/mark\u003e and then read the below section.\n\n### Setting up .env file\n\nNow that you have installed all the required files and modules, you have to make a \u003cmark\u003e.env\u003c/mark\u003e file and then copy the contents of \u003cmark\u003e.env.example\u003c/mark\u003e file to \u003cmark\u003e.env\u003c/mark\u003e file and change the enviroment variables value accordingly.\n\n### Running the code\n\nFirstly you need to install all the project dependencies. If you do not have a go.mod file run the following command to create one `go mod init \u003cyour_module-name\u003e`. Once it is created then run this `go mod tidy` to install all the required dependencies.\n\nAt this point you have all the dependencies installed to run the project. Now this project also includes programmatic database migrations. So the project has 3 CMD commands to either run the migrations or the server. The commands are as follows:\n\n1) `go run src/main.go migrateUp` - This will run all the up migrations.\n2) `go run src/main.go migrateDown` - This will run all the down migrations.\n3) `go run src/main.go run` - This will start the server.\n\nThe starting point of the project is in \u003cmark\u003esrc\u003c/mark\u003e folder named \u003cmark\u003emain.go\u003c/mark\u003e.\n\n## Enjoy playing with API's - make updates and hit a PULL Request to merge 🎉 ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntrv3390%2Fgo-crud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntrv3390%2Fgo-crud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntrv3390%2Fgo-crud/lists"}