BlogApp is a simple blogging platform built with Node.js, Express, and MongoDB. It uses Handlebars as the templating engine and Passport for authentication.
- User authentication with Passport
- Flash messages for alerts and errors
- CRUD operations for blog posts and categories
- Sorting and filtering of blog posts by categories
express
: Framework for building web applications on Node.jsexpress-handlebars
: A Handlebars view engine for Expressbody-parser
: Middleware to handle HTTP POST request in Express.jsmongoose
: MongoDB object modeling toolexpress-session
: Session middleware for Expressconnect-flash
: Flash messages for Express applicationspassport
: Authentication middleware for Node.js
- Install dependencies with
npm install
- Start the server with
npm start
- Visit
http://localhost:8081
in your browser
/admin
: Admin routes/usuarios
: User routes/
: Home page, displays all blog posts/postagem/:slug
: Displays a single blog post/categorias
: Displays all categories/categorias/:slug
: Displays all blog posts in a category/404
: Error page
The application uses MongoDB for data storage. It connects to a local MongoDB instance by default (mongodb://localhost/blogapp
).
The public
directory contains all static files used in the application.
The application runs on port 8081 by default. You can change this by modifying the port
variable in app.js
.
This is a basic blogging platform and is not intended for production use without further development and security considerations.