This is an Express.js application for managing a local library. The application is part of the Express Tutorial on MDN.
- Book, Author, Genre, and BookInstance models for the local library.
- List and detail pages for all models.
Follow these steps to set up the project on your local machine.
Clone the repository to your local machine using the following command:
git clone https://github.com/Mido191020/Local-Library-website.git
cd express-locallibrary-tutorial-mine
Install the required dependencies using npm:
npm install
Create a .env
file in the root directory with the following variables:
DB_CONNECTION=<your_database_connection_string>
SECRET_KEY=<your_secret_key>
DB_CONNECTION
: Your MongoDB connection string.SECRET_KEY
: A secret key for session handling.
Start the application using npm:
npm start
Open your web browser and navigate to:
http://localhost:3000
- The homepage displays a summary of the local library.
- Navigate through the different sections using the navigation bar.
- You can view, add, update, and delete books, authors, genres, and book instances.
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
- Make your changes and commit them:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature-branch
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any inquiries or issues, please contact Mido at [email protected].