/CRUDHeroes

Primary LanguageHTMLMIT LicenseMIT

CRUDHeroes

CRUDHeroes is a web solution to manage heroes profiles, classifing the heroe by power, weakness and studio. This project provides a good sample of how-to-do a CRUD in Node.js using MongoDB to persist the data's application.

CRUDHeroes - Home

Table of Contents

Installation

First make sure you have all the apps necessaries to execute the solution:

  • node.js >= v10.15.1
  • mongodb >= v4.0.5
  • npm >= v6.4.1

Then checkout the code and install the dependencies:

git clone https://github.com/fabriciohsilva/CRUDHeroes.git -b stable --single-branch --recursive

cd ./CRUDHeroes
npm install

Running standalone:

npm start

Setup

This solutions is configurated by default to connect in MongoDb without authentication.

If your database requires authentication make sure to setup the information in app.js file.

Configure your informations, using the code below like sample:

mongoose.connect('mongodb://username:password@host:port/CrudHeroes?options...', { useNewUrlParser: true })
  .then(() =>  console.log('connection succesful'))
  .catch((err) => console.error(err));

  db.close();
});

Browser Compatibility

CRUDHeroes has been tested successfully with:

  • Chrome 70.0
  • Egde

This solutions it's not compatible with Internet Explorer browser

How it works

This application allow users to create a database of all their favorites Heroes. They can register the studios and then associate the heroes to the studios registered.

The link default to execute the solution is:

http://localhost:3000/

To start using the program click "Studio Page" button

CRUDHeroes - Studio Page

To add a new Studio, click on "Create Studio", fill all necessary data and click "Save".

To edit a Studio informations click on "pencil" icon.

CRUDHeroes - Studio

To remove a Studio click on "trash can" icon.

After register the Studio the users can register Heroes. On Home page click "Heroes Page"

CRUDHeroes - Heroes Page

To add a new Hero, click on "Create Hero", fill all necessary data and click "Save".

CRUDHeroes - Hero

To edit an Hero informations click on "pencil" icon.

To remove an Hero click on "trash can" icon.

Credits

  • NodeJs
  • MongoDb
  • NPM
  • Express Generator
  • ESLint
  • Prettier
  • Mongoose
  • Express Validator

Top Contributors


FabrĂ­cio Henrique

Iolanda Santos


Michele Silva


Thaysa Santos

License

CRUDHeroes is released under the MIT License.