Skip to content

Latest commit

 

History

History
93 lines (59 loc) · 2.74 KB

File metadata and controls

93 lines (59 loc) · 2.74 KB

nodejs-auto-swagger-doc-generator

Streamline your API documentation process with the Node.js Auto Swagger Doc Generator. This project integrates seamlessly with swagger-autogen, allowing you to eliminate the manual effort traditionally associated with documenting APIs. Enjoy the benefits of automatic Swagger documentation generation, ensuring that your API documentation is always up-to-date and reflective of your codebase.

Table of Contents

Getting Started

Follow these steps to set up and use the Node.js Auto Swagger Doc Generator in your Node.js project.

Prerequisites

Make sure you have Node.js and npm installed on your machine.

Create a MongoDB Atlas Account (Optional): If you don't have a MongoDB server running locally, you can sign up for a free account on MongoDB Atlas and create a cluster MangoDB.

Create a .env file with below

PORT=<server port>
MONGODB_URI=<mangodb cluster URL>
JWT_SECRET=<any random secret key>

Clone

git clone https://github.com/harshatechtrainings/nodejs-auto-swagger-doc-generator.git

Copy paste the .env file created above in this project

Installation

Clone the repository and install the dependencies specified in your package.json:

cd nodejs-auto-swagger-doc-generator
npm install

Start Server

To access the application run the below command

node index.js

By running the above command swagger-output.json documentaion will be ready before the start of the appplication.

Swagger Endpoint

Endpoint is accessible at http://localhost:3000/api-docs/

Swagger-autogen

To know more about the swagger autogen follow documentation swagger-autogen

My API Documentation

Documentation automatically generated by the swagger-autogen module. You can find more inofmation about the endpoints in the baove swagger endpoint.

Endpoints

Authentication

  • Signup https://localhost:3000/auth/signup
  • Signin https://localhost:3000/auth/signin

Users

  • DeleteUser http://localhost:3000/users/{user}
  • FetchUser http://localhost:3000/users/{user}
  • UpdateUser http://localhost:3000/users/{user}
  • FetchUsers http://localhost:3000/users/

Contact

Feel free to contact through below email