https://github.com/teohrt/credo
Go Coding Challenge
https://github.com/teohrt/credo
api go golang interview weather
Last synced: 7 months ago
JSON representation
Go Coding Challenge
- Host: GitHub
- URL: https://github.com/teohrt/credo
- Owner: teohrt
- License: mit
- Created: 2019-02-04T22:42:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-05T11:32:32.000Z (over 7 years ago)
- Last Synced: 2024-12-27T17:35:14.158Z (over 1 year ago)
- Topics: api, go, golang, interview, weather
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go Coding Challenge
### Create an API with two endpoints:
1. countcaps/{someString}
* Takes a string as input
* Returns the number of capital letters in the string.
* Write unit tests.
2. weather/favorites
* Takes no input
* Looks up the weather in 5 zipcodes using openweather.org
* Use go routines
* Use channels
* Returns a JSON with an array of zipcode/tempature elements
___
## How do I run it?
- First things first: create a .env file at the root of the directory contatining the OWM_DEVELOPER_KEY
- While in the root of the directory, start the server with the following:
```sh
$ go run main.go
```
## Routes:
* (GET) localhost:8080/api/weather/favorites
* (GET) localhost:8080/api/countcaps/{word}