Skip to content

RestAPI for Authentication/Authorization and CRUD operations.

License

Notifications You must be signed in to change notification settings

mJiyan/nodejs-blog

Repository files navigation

NodeJS Blog

You can use it as a basic project for Authentication/Authorization and CRUD operations.

Before you begin, do not forget create an .env file, such as an .env.example file.

Table of Contents

Installation

with Docker

git clone https://github.com/mJiyan/nodejs-blog.git
cd nodejs-blog
docker-compose up --build

manually

git clone https://github.com/mJiyan/nodejs-blog.git
cd nodejs-blog
yarn

## Prepare your environment variables with generating .env file like in the .env.example file
yarn start

Test

git clone https://github.com/mJiyan/nodejs-blog.git
cd nodejs-blog
yarn

## Prepare your environment variables with generating .env file like in the .env.example file
yarn test

Documentation

git clone https://github.com/mJiyan/nodejs-blog.git
cd nodejs-blog
yarn

## Prepare your environment variables with generating .env file like in the .env.example file
yarn start

## Then open the: http://localhost:8081/api-docs

Structure


├─ src
│  ├─ api
│  │  ├─ controllers
│  │  │  ├─ authControllers.js
│  │  │  ├─ blogController.js
│  │  │  └─ userController.js
│  │  ├─ routes
│  │  │  ├─ authRoutes.js
│  │  │  ├─ blogRoutes.js
│  │  │  ├─ routeManager.js
│  │  │  └─ userRoutes.js
│  │  ├─ swagger
│  │  │  └─ swagger.yaml
│  │  └─ validators
│  │     └─ user.validator.js
│  ├─ config
│  │  ├─ index.js
│  │  ├─ logger.config.js
│  │  └─ swagger.config.js
│  ├─ loaders
│  │  ├─ express.js
│  │  ├─ index.js
│  │  └─ mongoose.js
│  ├─ models
│  │  ├─ blogModel.js
│  │  ├─ index.js
│  │  └─ userModel.js
│  ├─ utils
│  │  ├─ index.js
│  │  └─ util.js
│  └─ app.js
├─ test
│  └─ api
│     ├─ controllers
│     │  ├─ auth.test.js
│     │  ├─ blog.test.js
│     │  ├─ index.test.js
│     │  └─ user.test.js
│     └─ helpers
│        └─ test.model.json
├─ .dockerignore
├─ .env
├─ .gitignore
├─ docker-compose.yaml
├─ Dockerfile
├─ LICENSE
└─ package.json

Support

Please open an issue for support & suggestions.

Contributing

Please contribute using Github Flow. Create a branch, add commits, and open a pull request.

About

RestAPI for Authentication/Authorization and CRUD operations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published