You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Reviewed-on: #34 |
10 months ago | |
---|---|---|
@types/src | 1 year ago | |
Docker | 10 months ago | |
src | 1 year ago | |
.eslintrc.js | 1 year ago | |
.gitignore | 1 year ago | |
README.md | 1 year ago | |
config.json | 1 year ago | |
package-lock.json | 1 year ago | |
package.json | 1 year ago | |
run.sh | 1 year ago | |
screenshot-service.service | 1 year ago | |
tsconfig.json | 1 year ago |
README.md
Screenshot service
Dependencies
Xvfb
fluxbox
firefox-beta
Building
docker image build -t headless-fox Docker
Running the server
npm start
Visit localhost:3000 to see the test form
To set up a systemd daemon that starts with the server, use:
npm run install-daemon
Testing the API
with httpie:
http POST localhost:3000/api/requests url==pearson.com 'domains[]==youtube.com' 'domains[]==google.com'
It returns a 303 response that redirects to a URL you can poll to see the status of the screenshot request.