Skip to content

Commit

Permalink
docs(readme): add docker
Browse files Browse the repository at this point in the history
  • Loading branch information
bartholomej committed Nov 23, 2024
1 parent a96245b commit 49b6388
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
> - Tested (~100% Code coverage)
> - ✅ Ready for new ČSFD 2025!
> - You can use in:
> - Docker – [_How to do it?_](#-docker)
> - Firebase function
> - AWS λ (lambda function)
> - CloudFlare Worker
Expand Down Expand Up @@ -361,6 +362,43 @@ csfd

_Note: You can not use both parameters `includesOnly` and `excludes`. Parameter `includesOnly` has a priority._

## 📦 Docker

You can use this library in Docker.

We have [prepared a Docker image](https://hub.docker.com/r/bartholomej/node-csfd-api) for you.

### Prebuilt image

```bash
docker pull bartholomej/node-csfd-api
```

### Build & run your own image

> Build image
```bash
docker build -t node-csfd-api .
```

> Run image on port 3000
```bash
docker run -p 3000:3000 node-csfd-api
```

> Open http://localhost:3000
### API endpoints

> Some examples
- `/movies/535121`
- `/search/quentin+tarantino`
- `/creators/2120`
- `/user-ratings/912-bart`

## 🧑‍💻 Used by

### Web extensions
Expand Down
1 change: 0 additions & 1 deletion server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ app.get('/', (_, res) => {
});

app.get(['/movie/', '/creator/', '/search/', '/user-ratings/'], (req, res) => {
console.log(req.url);
res.json({ error: `ID is missing. Provide ID like this: ${req.url}${req.url.endsWith('/') ? '' : '/'}1234` });
});

Expand Down

0 comments on commit 49b6388

Please sign in to comment.