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.
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
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();
});
CRUDHeroes has been tested successfully with:
- Chrome 70.0
- Egde
This solutions it's not compatible with Internet Explorer browser
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
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.
To remove a Studio click on "trash can" icon.
After register the Studio the users can register Heroes. On Home page click "Heroes Page"
To add a new Hero, click on "Create Hero", fill all necessary data and click "Save".
To edit an Hero informations click on "pencil" icon.
To remove an Hero click on "trash can" icon.
- NodeJs
- MongoDb
- NPM
- Express Generator
- ESLint
- Prettier
- Mongoose
- Express Validator
FabrĂcio Henrique |
Iolanda Santos |
Michele Silva |
Thaysa Santos |
CRUDHeroes is released under the MIT License.