e146f06661 | ||
---|---|---|
.github | ||
public | ||
src | ||
.gitignore | ||
LICENSE | ||
README.md | ||
fpb.json | ||
package-lock.json | ||
package.json |
README.md
free-programming-books-search
The free-programming-books-search is a companion project of free-programming-books. It allows users to search by book title or author and filter by language. The search index is updated once per day, so changes made on free-programming-books may not be immediately reflected.
Contents
How It All Works
-
THERE IS NO DATABASE INVOLVED. Rather, the books are stored in a markdown on free-programming-books and is parsed daily by free-programming-books. The books and all info pertaining to them are stored in a json file called fpb.json.
-
This Json is downloaded locally and searched locally when the actual search function is used.
Installation
NPM Installation
- Make sure you have Node.js installed. If you already do, skip to Running the Website.
- Otherwise, download the LTS installer from Node.js website.
- Follow the instructions of the installer, make sure npm is listed as a package to be installed.
- Click Install.
- Verify that Node.Js has been installed by going to command line and typing in
node
. It should show the current version. - Close out of Node by either closing and reopening the command line or with Ctrl + C.
- Make sure to check out the NPM website for more info.
Running the Website
- Make sure you have Git installed.
- Clone the repo from Github with Git.
- Navigate to the folder using command line. A easy way is to type "
cd
" and then drag and drop the folder into command line. - Type
npm install
. - Type
npm install react-scripts
. - Type
npm start
. At this point, the command prompt should start up the server, and a tab in your default browser should open up to localhost.
Deployment
MAKE SURE YOU HAVE COMPLETED THE INSTALLATION STEPS FIRST!
- First, make sure that you the local folder containing the files has a remote configured called "
origin
".- If you aren't sure, navigate to the folder using Git (type "
cd
", then drag and drop folder in to Git command line). - Type
git init
. - Type
git remote add origin <repo url>
, replacing<repo url>
with the url of your github repository.
- If you aren't sure, navigate to the folder using Git (type "
- Now, run
npm install -g gh-pages
. - Run
npm run deploy
. - This should deploy your code to "
https://yourusername.github.io/free-programming-books-search/
".
FAQ
-
What database are we using to store the books?
- NONE! The books are stored in a JSON file which is downloaded locally.
-
I added a book but it's not showing up on search?
- Give it some time. The parser is run once a day, so it may take up to 24 hours for the search to reflect that.