The missing pieces of nhentai.
Create a JavaScript file that default-exports an array of DatabaseCode:
// @ts-check
/** @type {import("@riffyh/commons/src").DatabaseCode[]} */
const codes = [
// ...
]
export default codesTip
For type safety, add the JSDoc type above and install @riffyh/commons in your package.json.
Then run the scraper to fetch data (choose one):
# Node fetch
bunx @riffyh/scraper fetch ./index.js
# Browser
bunx @riffyh/scraper fetch --browser ./index.js
# Headless browser
bunx @riffyh/scraper fetch --headless ./index.jsAfter running, a data/ directory will be created in the current working directory.
Use the following commands to set up the development environment:
# Clone the project and navigate into the repository
git clone [email protected]:rayriffy/rayriffy-h.git
cd rayriffy-h
# Create a symlink to your data partition
ln -s <path-to-data-partition> ./web/data
# Install dependencies and start the project
bun i
cd web
bun run devYour app will be available at http://localhost:5173.
For production, a base image without the data partition is available. You can either copy the data partition into the image via a Dockerfile or mount it as a Docker volume.
FROM ghcr.io/rayriffy/riffyh-core as base
COPY data ./data
CMD ["./bun", "./build/index.js"]All Riffy H applications and libraries are licensed under the MIT License. See the LICENSE file for details.