Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nicolasgandrade/node-blogapp

Blog App made with NodeJs and MongoDB database
https://github.com/nicolasgandrade/node-blogapp

authentication bcrypt blog express handlebars hash javascript login-system mongodb mongoose nodejs passport register sequelize

Last synced: 3 days ago
JSON representation

Blog App made with NodeJs and MongoDB database

Awesome Lists containing this project

README

        

# NodeJs BlogApp
## πŸ’š Blog App created with NodeJS and MongoDB

### Features
- [x] Everybody is able to read posts
- [x] Categories filter
- [x] Register new user and admin account
- [x] Login into your account
- [x] Hashed passwords
- [x] Admin options: Create, edit and remove posts and categories
- [x] Logout system

### Requirements

Before running the application, you must have NodeJs and MongoDB installed.
Make sure the mongo server is up before starting.

### 🎲 Running the Server

You can run the app using node command:
````node app.js````

The blog is hosted on localhost port 8081 (localhost:8081).

Note: The database in MongoDB will be created automatically after the application starts.

### Main Routes

* /
* /users/register
* /users/login
* /categories
* /admin
* /admin/categories
* /admin/posts

If you want to register an admin user, you need to change the code inside *routes/user.js* **from this:**
````
const newUser = new User({
name: req.body.name,
email: req.body.email,
password: req.body.password
})
````
**to this**
````
const newUser = new User({
name: req.body.name,
email: req.body.email,
password: req.body.password,
isAdmin: 1
})
````
(lines 63/64 *routes/user.js*)
and then, reload the app and **register the new admin user.**

### πŸ’» Technologies

The following tools were used in the construction of the project:

- NodeJs
- Express
- Handlebars
- MongoDB
- Bootstrap

### Author
---

Made by Nicolas GuerreroπŸ‘‹