https://github.com/eyupfidan/node-blog
This project is a blog application developed using Node.js, Express, Handlebars, and MongoDB.
https://github.com/eyupfidan/node-blog
authentication express handlebars session
Last synced: 3 months ago
JSON representation
This project is a blog application developed using Node.js, Express, Handlebars, and MongoDB.
- Host: GitHub
- URL: https://github.com/eyupfidan/node-blog
- Owner: eyupfidan
- Created: 2022-09-20T13:30:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-24T14:03:07.000Z (almost 3 years ago)
- Last Synced: 2025-01-27T22:48:02.147Z (over 1 year ago)
- Topics: authentication, express, handlebars, session
- Language: JavaScript
- Homepage:
- Size: 20.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Node.js Blog Application
This application is a blog app developed using Node.js, Express, Handlebars, and MongoDB. The app allows users to add new blog posts, view and update existing posts, and also includes login and session functionality.
Installation
- Download or clone the project to your computer.
- If Node.js is not already installed, download and install it from here.
- Navigate to the project's root directory in your terminal or command prompt.
- Run the command
npm install in your terminal or command prompt.
- Create a MongoDB account or log in to an existing one.
- Create a
.env file and set the variables containing your MongoDB connection string and session secret key:
```bash
MONGOOSE_CONNECT_URL=
```
- Run the command
npm start in your terminal or command prompt.
Usage
The app runs at http://localhost:3000.
-
/: Home page where you can view the blog posts.
-
/posts: List of blog posts, form to add a new post, and page to edit an existing post.
-
/users: Login page and registration page for users.
-
/users/logout: Logs out the user.
Development
The app is developed using Node.js, Express, Handlebars, and MongoDB. The main files are:
-
app.js: The main application file.
-
routes/main.js: The routers for the home page route.
-
routes/posts.js: The routers for the blog post routes.
-
routes/users.js: The routers for the user routes.
-
views/: Handlebars templates.
-
public/: Static files used to serve content.
Contributing
Before contributing, please check the issues tab and discuss any suggestions or issues related to the development of the project.
- Fork the repository.
- Create a branch:
git checkout -b feature/xyz. - Commit your changes:
git commit -am 'Add some feature'. - Push to the branch:
git push origin feature/xyz. - Submit a pull request.