A very simple Notification Service in Go with Postgres Database ๐ฌ
- Clone this repository
git clone https://github.com/Joe2k/playing-with-go
cd playing-with-go
- Create a .env file in the root directory and place all important DB info like below
APP_DB_USERNAME=postgres
APP_DB_PASSWORD="12345"
APP_DB_NAME=postgres
- Start a Postgres server with Docker with the make command below
make postgres
- Run the Go Server
go run main.go
To run unit tests, run the command below
go test -v
GET /notifications
POST /notification
GET /notification/:id
PUT /notification/:id
Parameter | Type | Description |
---|---|---|
id |
int |
Optional |
number |
int |
Contact Number |
message |
string |
Message to be delivered |