This is the collection service of newsbot to pull articles from the web.
Go to file
jtom38 b94257f5aa Merge pull request 'fixed the route to pull sourceById' (#11) from features/sourceById into main
Reviewed-on: #11
2024-06-02 19:54:21 -07:00
cmd Getting the user and jwt stuff added to the api. Now to get swagger working 2024-05-05 10:02:17 -07:00
docs updated handlers to define if the response was an error 2024-06-02 17:27:36 -07:00
domain updated handlers to define if the response was an error 2024-06-02 17:27:36 -07:00
internal fixed the route to pull sourceById 2024-06-02 19:54:04 -07:00
.drone.yaml dumb rename and attempting to get CI working 2024-05-07 22:20:50 -07:00
.gitignore minor changes to make and gitignore 2024-05-01 18:27:19 -07:00
Dockerfile Getting the user and jwt stuff added to the api. Now to get swagger working 2024-05-05 10:02:17 -07:00
README.md Feature/dynamic swagger uri (#15) 2022-07-14 09:59:55 -07:00
api.http minor updates 2024-05-02 17:38:30 -07:00
docker-compose.yaml Feature/dynamic swagger uri (#15) 2022-07-14 09:59:55 -07:00
go.mod jwt was added and started to tie it into handlers 2024-05-04 11:47:30 -07:00
go.sum jwt was added and started to tie it into handlers 2024-05-04 11:47:30 -07:00
makefile jwt was added and started to tie it into handlers 2024-05-04 11:47:30 -07:00
sqlc.yaml Feature/sql (#8) 2022-06-08 21:17:08 -07:00

README.md

newsbot.collector.api

This is the collection service of newsbot to pull articles from the web.

Deployment

  1. Create a copy of the docker compose file and make it local
  2. Update the docker-compose.yaml with your secrets
  3. Run migrations 2. docker compose run api /app/goose -dir "/app/migrations" up
  4. Run app
    1. docker compose up -d
  5. Once the app is running go to the swagger page and validate that you see the seeded sources.
    1. http://localhost:8081/swagger/index.html#/Source/get_config_sources
    2. curl -X 'GET' 'http://localhost:8081/api/config/sources' -H 'accept: application/json'
  6. Add any new sources
  7. Add a Discord Web Hook
    1. curl -X 'POST' 'http://localhost:8081/api/discord/webhooks/new?url=WEBHOOKURL&server=SERVERNAME&channel=CHANNELNAME' -H 'accept: application/json' -d ''
  8. Create your subscription links
    1. This is a link between a source and a discord web hook. Without this, the app will not send a notification about new posts.

Errors

  • pq: permission denied to create extension "uuid-ossp"
    • Might need to grant your account ALTER USER root WITH SUPERUSER; to create the 'uuid-ossp' for uuid creations