Home

BookSearcher

A mobile application to scan images of bookshelves for books and cataloguing them.

Environment Variables

To run this project, you will need to add the following environment variables to your .env file in the /api folder

  • PORT: The port for the api to listen on (default: 3000)
  • STORAGE_PATH: The path for storing images and other files used by the backend
  • MYSQL_HOST: MySQL server host (default: localhost)
  • MYSQL_DATABASE: MySQL database name (default: booksearcher)
  • MYSQL_USERNAME: MySQL username (default: booksearcher)
  • MYSQL_PASSWORD: MySQL password (given when running schema.sql)
  • MYSQL_PORT: MySQL port (default: 3306)

Run API Locally

Make sure MySQL server is installed and running.

Go to the API directory

  cd booksearcher/api

Run the schema.sql file

  mysql -u root -p < schema.sql

Add the password to MYSQL_PASSWORD in the .env file

  nano .env

Install dependencies

  npm install

Run the database migrations

  npm run migrate

Start the server in dev mode

  npm run dev