https://github.com/tacheshun/golang-rest-api
This is a demo repository meant for learning purposes. DO NOT USE ANY OF THIS CODE IN PRODUCTION.
https://github.com/tacheshun/golang-rest-api
development
Last synced: 3 months ago
JSON representation
This is a demo repository meant for learning purposes. DO NOT USE ANY OF THIS CODE IN PRODUCTION.
- Host: GitHub
- URL: https://github.com/tacheshun/golang-rest-api
- Owner: tacheshun
- License: mit
- Created: 2020-12-03T10:51:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-19T12:11:00.000Z (over 5 years ago)
- Last Synced: 2023-03-12T22:15:37.722Z (over 3 years ago)
- Topics: development
- Language: Go
- Homepage:
- Size: 48.8 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Golang REST and gRPC API - work in progress
Golang REST API and 2 (micro)services - work in progress
## Installation
1. After cloning this repository, cd into it and run `docker-compose up -d`.
This will bring up the postgress db in a docker installation. Remember, if you destroy the docker container the data will be lost. We don't use volumes here.
2. Copy the contents of `etc/createTablesWithData.sql` into your db console and run it in order to create the tables and insert seed data. Caution, it will install 1M records.
3. generate code from proto with make proto
4. run the server `go run ./salesservice/cmd/sales/main.go`
5. run the client `go run ./productservice/cmd/products/main.go`