/mean-demo-app

Sample MEAN App

Primary LanguageJavaScript

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.

  1. Create db named bookstore and collections name books & geners.
  2. Run the mongod. It will waiting 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

  1. Home or Book lists http://localhost:3000 to view it in the browser.
  2. Book lists http://localhost:3000/#!/books to view all available books in store.
  3. Book detail http://localhost:3000/#!/books/detail/id.
  4. Add new book http://localhost:3000/#!/books/add.
  5. Edit existing book info http://localhost:3000/#!/books/edit/id.

APIs Expose from Node

Books

  1. Books list. GET http://localhost:3000/api/books.
  2. Book Detail. GET http://localhost:3000/api/books/id.
  3. Add Book. POST http://localhost:3000/api/books/.
  4. Edit Book. PUT http://localhost:3000/api/books/id.
  5. Delete Book. DELETE http://localhost:3000/api/books/id.

Geners

  1. Geners list. GET http://localhost:3000/api/geners.
  2. Gener Detail. GET http://localhost:3000/api/geners/id.
  3. Add Gener. POST http://localhost:3000/api/geners/.
  4. Edit Gener. PUT http://localhost:3000/api/geners/id.
  5. Delete Gener. DELETE http://localhost:3000/api/geners/id.