0.0.9 • Published 1 year ago
@robcross1977/kjv-search v0.0.9
King James Version Bible Search
The purpose of this library is two-fold.
- Generate a database containing the King James version of the bible
- Expose a
search
function to query that database using everyday bible search strings. Ex.Genesis 1:1-5
Installing
- Run the command
git clone https://github.com/robcross1977/kjv-search.git
orgit@github.com:robcross1977/kjv-search.git
orgh repo clone robcross1977/kjv-search
depending on your setup. - Run the command
npm i
Running the Tests
- To validate the tests simply work, use the command
npm test
- To calculate the test coverage use the command
npm run test:ci
Generating the DB
- Add a .env file to the root of the project.
- Add an entry to the env file for the database connection string
DATABASE_URL=<db_type>://<username>:<password>@<domain>:<port>/defaultdb?sslmode=verify-full
- Ex:
postgresql://guy:abc123@kjv-search.cloud:1234/defaultdb?sslmode=verify-full'
- Ex:
- Run the command
npm run build
SqlLite DB
If you want to use sqlite you can change the file ./prisma/schema.prisma
to replace: 1. This: provider = "cockroachdb"
with provider = "sqlite"
2. This: url = env("DATABASE_URL")
with url = "file:./kjv.db"
3. Then run the seeder.
This is unnecessary if you just want a sqlite database file to use for your application. I've included it pre-built in ./prisma/kjv.db
and you are welcome to make a copy.
Search
Coming Attractions
- A basic search component
- A bible memorization component that leads the user through various memorization exericses based on input in the form of bible search strings.