https://github.com/negrel/apip
A free public ip api.
https://github.com/negrel/apip
api apip docker golang ip public
Last synced: 3 months ago
JSON representation
A free public ip api.
- Host: GitHub
- URL: https://github.com/negrel/apip
- Owner: negrel
- License: mit
- Created: 2020-03-16T08:56:14.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-21T09:16:24.000Z (about 5 years ago)
- Last Synced: 2025-01-08T09:13:57.855Z (5 months ago)
- Topics: api, apip, docker, golang, ip, public
- Language: Go
- Size: 3.86 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# APIP - Free public IP API
*Get your public IP address in one **HTTP** request.*
## What is APIP
**APIP** is an **open source** public IP API that focuses on simplicity. It can be really useful if you're looking for a way to get your public IP from **command line**, **script** or **programs**. There is a public server for test purpose : [demo-apip.herokuapp.com](https://demo-apip.herokuapp.com/) hosted on a **free** dynos at [heroku.com](https://heroku.com). If your looking for a more reliable public server for public IP API I recommend you [**ipify.org**](https://ipify.org).
[](https://heroku.com/deploy)
## Setup a local APIP server
**Requirements** :
You must have [Golang](https://golang.org/dl/) installed on your server.
Clone the repository :
```bash
$ git clone https://github.com/negrel/apip.git $GOPATH/your/path
```Run the code for test :
```bash
$ cd apip
$ go run .
```Build the project :
```bash
$ go build
```This will build the go code to a binary file named "apip". To launch the server :
```bash
$ ./apip
```### Using the Makefile
_Take a look at the exemple.env file and write your own .env file._
Build the image:
```
$ make build
# Or without caching
$ make build-nc
```Run it:
```
$ make run
# Or build it then run it
$ make up
```To stop & remove the container :
```
$ make stop
```Compile go to binary :
```
# Build the binary to $BIN_OUTPUT
$ make bin
```Clean the binary :
```
$ make clean
```Deploy to heroku :
```
$ make heroku
```## :stars: Show your support
Please give a :star: if this project helped you!
## :scroll: License
MIT © Alexandre Negrel