apip

command module
v0.0.0-...-c866eea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2020 License: MIT Imports: 7 Imported by: 0

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 hosted on a free dynos at heroku.com. If your looking for a more reliable public server for public IP API I recommend you ipify.org.

Deploy

Setup a local APIP server

Requirements :

You must have Golang installed on your server.

Clone the repository :

$ git clone https://github.com/negrel/apip.git $GOPATH/your/path

Run the code for test :

$ cd apip
$ go run .

Build the project :

$ go build

This will build the go code to a binary file named "apip". To launch the server :

$ ./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

🌠 Show your support

Please give a ⭐ if this project helped you!

📜 License

MIT © Alexandre Negrel

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL