URL: https://bilbolibrary.herokuapp.com
npm install nodemon -g #suggested for development
npm install
The previous command will download all the dependencies and install them in the node_modules folder.
It gets the dependencies from the package.json file. The dependencies are listed in the dependencies section and are added there everytime we install a new dependency with npm install .
To create the database, move into the model folder and run the program database_management.py
python3 database_managing.py
The python program database_managing.py file looks for the database file (bilboData.sqlite) and if it doesn't it creates it . It builds the sql database from the file dbdesigner.sql .
If the folder bookdata does not exist, it is created and the titles from the file titles.py are downloaded as json files and stored inside bookdata and then loaded in the database . Currently the datbase has 2 users, but sign up is working properly so more can be added. There is no admin user .
The libraries, borrowing, returning tables are loaded from the files librarie.py , borrowing.py, return.py
If there are no errors the database is created successfully .
npm start
And it automatically loads the changes while working on the files.
OR
npm run startWebsite
It runs node index.js
Building the image
docker build -t bilbo .
Running the image
docker run -d -p 8080:8080 bilbo
Then head over to localhost:8080