browsertrix/frontend
2021-11-19 14:07:13 -08:00
..
src Switch frontend to use Typescript (#12) 2021-11-19 14:07:13 -08:00
.gitignore Set up frontend dev tooling (#6) 2021-11-18 17:26:10 -08:00
index.html Set up frontend dev tooling (#6) 2021-11-18 17:26:10 -08:00
package.json Switch frontend to use Typescript (#12) 2021-11-19 14:07:13 -08:00
postcss.config.js Set up frontend dev tooling (#6) 2021-11-18 17:26:10 -08:00
README.md Configure API base URL in frontend (#14) 2021-11-19 13:30:51 -08:00
sample.env.local Configure API base URL in frontend (#14) 2021-11-19 13:30:51 -08:00
tailwind.config.js Switch frontend to use Typescript (#12) 2021-11-19 14:07:13 -08:00
tsconfig.json Switch frontend to use Typescript (#12) 2021-11-19 14:07:13 -08:00
web-test-runner.config.mjs Switch frontend to use Typescript (#12) 2021-11-19 14:07:13 -08:00
webpack.config.js Switch frontend to use Typescript (#12) 2021-11-19 14:07:13 -08:00
yarn.lock Switch frontend to use Typescript (#12) 2021-11-19 14:07:13 -08:00

Browsertrix Cloud frontend

Quickstart

Copy environment variables from the sample file:

cp sample.env.local .env.local

Install dependencies:

yarn

Start the dev server:

yarn start-dev

This will open localhost:9870 in a new tab in your default browser.

To develop against a local instance of the backend API, follow instructions for deploying to a local Docker instance. Update API_BASE_URL and then restart the dev server.

Scripts

yarn <name>
start-dev runs app in development server, reloading on file changes
test runs tests in chromium with playwright
build-dev bundles app and outputs it in dist directory
build bundles app app, optimized for production, and outputs it to dist
lint find and fix auto-fixable javascript errors
format formats js, html and css files

Testing

Tests assertions are written in Chai.

To watch for file changes while running tests:

yarn test --watch

To run tests in multiple browsers:

yarn test --browsers chromium firefox webkit