A tool to search comics from xkcd.
xkcd.mp4
- Download project:
git clone [email protected]:vacmannnn/xkcd-searcher.git && cd xkcd-searcher
- Build and run it:
make
make run
- Go to localhost:3000 to use search (default login and password is
user;user
)
If you want to run separate scenarios you may use:
make xkcd
to buildxkcd-server
make web
to buildweb-server
make test
to run all testsmake lint/sec
to run utility checks on project (to runmake sec
you need to buildxkcd-server
first)
Web-server connects with xkcd-server
to use it as comics finder and authorization service.
Default source url is localhost:3000/login
By default, it listens localhost:8080
. To use xkcd-server
you may use rest API:
Getting JWT:
curl -d '{"username":"admin", "password":"admin"}' "http://localhost:8080/login"
Update and search requests:
curl -X POST --header "Authorization:TOKENFROMPREVIOUSSTEP" "http://localhost:8080/update"
curl -X GET --header "Authorization:TOKENFROMPREVIOUSSTEP" "http://localhost:8080/pics?search='apple,doctor'"