MEAN Demo App
This is a sample MEAN demo app with full CRUD functionality.
Mongo
Download and Install https://www.mongodb.com/ in local system if not available and following the below steps.
- Create db named
bookstore
and collections namebooks
&geners
. - Run the
mongod
. It willwaiting for connections on port 27017
.
As soon as application will run mongodb will connect with node backend services.
Available Scripts
In the project directory, you can run:
Install nodemon globally.
npm install -g nodemon
npm install
to get the dependencies
npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
Routes Available within the Application
- Home or Book lists http://localhost:3000 to view it in the browser.
- Book lists http://localhost:3000/#!/books to view all available books in store.
- Book detail http://localhost:3000/#!/books/detail/id.
- Add new book http://localhost:3000/#!/books/add.
- Edit existing book info http://localhost:3000/#!/books/edit/id.
APIs Expose from Node
Books
- Books list.
GET
http://localhost:3000/api/books. - Book Detail.
GET
http://localhost:3000/api/books/id. - Add Book.
POST
http://localhost:3000/api/books/. - Edit Book.
PUT
http://localhost:3000/api/books/id. - Delete Book.
DELETE
http://localhost:3000/api/books/id.
Geners
- Geners list.
GET
http://localhost:3000/api/geners. - Gener Detail.
GET
http://localhost:3000/api/geners/id. - Add Gener.
POST
http://localhost:3000/api/geners/. - Edit Gener.
PUT
http://localhost:3000/api/geners/id. - Delete Gener.
DELETE
http://localhost:3000/api/geners/id.