49 lines
704 B
Markdown
49 lines
704 B
Markdown
# Giphy Proxy
|
|
|
|
Minimalistic Node.js proxy with a protected subroute.
|
|
|
|
## Setup
|
|
|
|
### Docker
|
|
|
|
```sh
|
|
r build -t giphy-proxy .
|
|
|
|
docker run -d \
|
|
-p 8080:8080 \
|
|
-e GIPHY_API_KEY="your_api_key" \
|
|
-e ACCESS_SECRET="mysecret" \
|
|
giphy-proxy
|
|
```
|
|
|
|
### Docker compose
|
|
|
|
```yaml
|
|
services:
|
|
randomgif:
|
|
container_name: randomgif
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "9099:8080"
|
|
environment:
|
|
- GIPHY_API_KEY=${GIPHY_API_KEY}
|
|
- ACCESS_SECRET=${ACCESS_SECRET}
|
|
```
|
|
|
|
## Usage
|
|
|
|
Example (Random):
|
|
|
|
```sh
|
|
curl http://localhost:8080/mysecret/
|
|
```
|
|
|
|
Example (Specific Tag):
|
|
|
|
```sh
|
|
curl http://localhost:8080/mysecret/cat
|
|
```
|
|
|
|
All subsequent routes will be ignored! |