Skip to content

osama784/Blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blog API

Nodejs app that handles Blogs CRUD operations with authentication and permissions for users 🔥

[!NOTE]
I'm using some environment variables like the DATABASE_URI to connect to mongoDB and SESSION_SECRET, create your own and connect to it to be able to run the app.

Tools:

  • Core Libraries:

    • Expressjs : handling API endpoints.
    • Mongoose : connecting to MongoDB, creating schemas (Blog and User).
  • Additional libraries: express-session, connect-mongo (session store), passport (local authentication using sessions), winston (logging), zod (validation).

General Idea:

  • Enabling users to create their own blogs and editing it while they're authenticated.
  • Using MVC model: controllers, models.
  • Middlwares and Routers for CRUD operations on users and blogs, and for authentication.

Installing the app:

run these commands to be able to run the app:

> git clone https://github.com/osama784/Blog.git
> cd Blog
> npm i

after that, create your own .env file and add the variables DATABASE_URI and SESSION_SECRET to it, then run:

> npm build
> npm start

Now you have the app on your local machine ❤️


Hope you get some benefits from this project❤️

About

Blog API that handles CRUD operations for blogs with authentication for users and authorization

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors