Levi Olson 6679bf8ab4 | 6 years ago | |
---|---|---|
.gitignore | 6 years ago | |
LICENSE | 6 years ago | |
README.md | 6 years ago | |
darksky.go | 6 years ago | |
main.go | 6 years ago | |
rest.go | 6 years ago | |
structs.go | 6 years ago | |
weather-api.service | 6 years ago |
A Golang Server that interfaces with the Dark Sky API so my Chrome Extension can get the weather.
sudo useradd weatherapi -s /sbin/nologin -M
sudo cp weather-api.service /lib/systemd/system/.
ls -al /lib/systemd/system
sudo chmod 755 /lib/systemd/system/weather-api.service
# add the DARK_SKY_API_KEY to the weather-api.service file
sudo systemctl enable weather-api.service
sudo systemctl start weather-api.service
sudo journalctl -f -u weather-api
# or
sudo systemctl status weather-api.service
Much of the source I obtained from github.com/shawntoffel/darksky. So thank you shawntoffel and contributors for that amazing codebase!