Skip to content

sakardogukan/Blog_Api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blog Api Project

Used technologies & Methods:

  • Node.Js
  • Express.Js
  • Mongoose - MongoDB SQL
  • Object Mapping (ORM)
  • Password Crypto
  • Cookies / Session

ER (Entity Relationship Diagram) Diagram

ERD

Node.js - Mongoose structure in the project

Mongoose

Steps to be taken before running the project.

- The project is downloaded from the github repo.
- After the project is opened in VSCode, the following commands are run from the gitBash terminal.

$ npm init -y
$ npm i express dotenv express-async-errors
$ npm i mongoose
$ echo PORT=8000 > .env
$ echo MONGODB=mongodb://127.0.0.1:27017/blogApi >> .env
$ cp ./env-sample ./.env
$ $ npm i cookie-session
$ nodemon // * Running *

- The synchronization function in line 40 of the index.js file should be run once and disabled again.
- Testing is done with the following URL queries via Thunder Client or Postman.

Folder/File Structure:

    src/
        controllers/
            blogController.js
            userController.js
        helpers/
        passwordEncrypt.js
        img/
            erdBlogApi.png
            mongoose.png
        middlewares/
            findSearchSortPage.js
        models/
            blogModel.js
            userModel.js
        routes/
            blogRoute.js
            userRoute.js
        dbConnection.js
        errorHandler.js
        sync.js
    .gitignore
    .env-sample
    index.js
    package-lock.json
    package.json    
    Readme.md

Resources used

Designed By DOGUKAN © Nov 2023

About

Blog_Api is a node.js project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published