New frontend repository for ipfs-search.com. Master is automatically deployed through Fleek.
npm install
npm run serve
Compiles and hot-reloads for development
npm run build
Compiles and minifies for production
npm run preview
Serves the latest build locally
npm run test
Run all tests and watch code
npm run test:once
Run all tests only once
npm run test:coverage
Run all tests once and create coverage report under './coverage'
npm run lint
Run code through linter to check
npm run lint:fix
Run code through linter and fix (if automatically possible)
npm run prettier:check
Test if code is formatted according to prettier spec
npm run prettier:write
Format code according to prettier spec
npm run prepare-githooks
Setup githook to automatically run prettier pre-commit. If you like this.
Developers: you will likely want to run npm run serve
in one terminal and npm run test
in another. You can use npm run prepare-githooks
to autoformat the code. Alternatively you can run npm run prettier:write
before pushing.
Ops will want to use npm run build
, npm run test
or npm run test:coverage
, npm run prettier:check
This build uses an API to check nsfw content.
The default API endpoint to is: https://api.ipfs-search.com/nsfw/
. This can be overridden by injecting environment variable VITE_NSFW_API
The API call should be: <VITE_NSFW_API><CID>
, so e.g.
https://api.ipfs-search.com/nsfw/QmSZzv7ux1LGwpehVcCMQ9ec945X6qE4qyjKDhCVwY25iw
https://api.ipfs-search.com/v1/nsfw/classify/