Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emanuelefavero/local-library
This is a Node.js Express MVC project for a local library website.
https://github.com/emanuelefavero/local-library
ejs express expressjs javascript mongodb mongoose mvc mvc-pattern nodejs
Last synced: about 6 hours ago
JSON representation
This is a Node.js Express MVC project for a local library website.
- Host: GitHub
- URL: https://github.com/emanuelefavero/local-library
- Owner: emanuelefavero
- License: mit
- Created: 2022-10-15T18:41:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-06T00:28:14.000Z (about 2 years ago)
- Last Synced: 2024-12-10T00:14:49.705Z (about 2 months ago)
- Topics: ejs, express, expressjs, javascript, mongodb, mongoose, mvc, mvc-pattern, nodejs
- Language: JavaScript
- Homepage: https://different-undershirt-bull.cyclic.app/catalog
- Size: 105 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Local Library Node MVC Project
This is a Node.js Express MVC project for a local library website. It is based on the [MDN Express tutorial](https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs) and the [Express Application Generator](https://expressjs.com/en/starter/generator.html).
_NOTE: MVC is a software design pattern that separates the application into three main logical components: the model, the view, and the controller. The model is the data, the view is the presentation, and the controller is the interface between them._
Learn More about MVC: [https://developer.mozilla.org/en-US/docs/Glossary/MVC](https://developer.mozilla.org/en-US/docs/Glossary/MVC)
## Live Demo
[https://different-undershirt-bull.cyclic.app/](https://different-undershirt-bull.cyclic.app/)
#### Screenshot
## Test the app locally
- Create a `.env` file in the root directory and add the following:
```env
NODE_ENV=development
MONGO_URI=YOUR_MONGO_URI
```> Note: Set NODE_ENV to 'production' when deploying to production
- Run the app:
```bash
npm i
npm i nodemon -g
npm run devstart
OR
npm i
npm i nodemon -g
npm run serverstart// Windows
SET DEBUG=express-locallibrary-tutorial:* & npm run devstart
```- Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
## Usage
Some Available URLs:
- `http://localhost:3000/`
- `http://localhost:3000/catalog`
- `http://localhost:3000/catalog/books`
- `http://localhost:3000/catalog/bookinstances`
- `http://localhost:3000/catalog/authors`
- `http://localhost:3000/catalog/genres`
- `http://localhost:3000/catalog/book/ID`
- `http://localhost:3000/catalog/book/create`## License
- [MIT](LICENSE.md)