Code Monkey home page Code Monkey logo

abhinav-m22 / node.js-_microservices Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sazamansari/node.js-_microservices

0.0 0.0 0.0 747 KB

Express.js is a framework of Node.js for building efficient, scalable Node.js server-side applications. It uses modern JavaScript, is built with JavaScript (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).

Home Page: https://www.npmjs.com/package/user-auth-microservice

License: MIT License

JavaScript 99.04% Dockerfile 0.96%

node.js-_microservices's Introduction

node.js-_microservices


Description

Express.js is a framework of Node.js for building efficient, scalable Node.js server-side applications. It uses modern JavaScript, is built with JavaScript (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).

Under the hood, Node.js makes use of Express, but also, provides compatibility with a wide range of other libraries, like e.g. Mongoose, allowing for easy use of the myriad third-party plugins which are available.

In recent years, thanks to Node.js, JavaScript has become the β€œlingua franca” of the web for both front and backend applications, giving rise to awesome projects like Angular, React and Vue which improve developer productivity and enable the construction of fast, testable, extensible frontend applications. However, on the server-side, while there are a lot of superb libraries, helpers and tools for Node, none of them effectively solve the main problem - the architecture.

User_Auth Microservices aims to provide an application architecture out of the box which allows for effortless creation of highly testable, scalable, loosely coupled and easily maintainable applications. The architecture is heavily inspired by Node.js.

This project is a part of the following Open Source Program

Table of Contents


Demo

Provide a link or embed a demo of your project (if applicable). You can also add screenshots or GIFs to showcase the functionality.


Technologies

List the technologies and programming languages used in your project.


Getting Started

Include instructions on how to get started with your project. This may include:

  1. Installation guide
  2. Dependencies or prerequisites
  3. How to run the project locally

Contributing

We welcome contributions from everyone. Here are some guidelines to get started:

  1. Fork the repository and create your branch: git checkout -b your-branch-name
  2. Make your changes and commit them: git commit -m 'Add some feature'
  3. Push to your forked repository: git push origin your-branch-name
  4. Open a pull request to the main repository's branch

Please follow the cotribution guide in all your interactions with the project.


Project Admins

Md Shadab Azam Ansari
Md Shadab Azam Ansari

Project Mentors

Rishita Jayant
Rishita Jayant


Mentor Name

Contributors

Thanks go to these Wonderful People: Contributions of any kind are welcome!

Mention the people who successfully contributed to your project as contributors.


License

Include the license information for your project. For example, you can use the MIT License:

This project is licensed under the terms of the MIT License. Feel free to contribute to this repo.

INSTALL

locally, usually for use as a module:

npm i user-auth-microservice

Authors

License

MIT License

API Reference

Get all items

  GET /api/items
Parameter Type Description
api_key string Required. Your API key

Get item

  GET /api/items/${id}
Parameter Type Description
id string Required. Id of item to fetch

Mongoose Connect

config/db.js

import mongoose from "mongoose";

const connectDB = async () => {
  let uri = process.env.MONGO_URI;

  try {
    await mongoose
      .connect(uri, {
        useNewUrlParser: true,
        useUnifiedTopology: true,
        useCreateIndex: true,
      })
      .catch((error) => {
        console.log("connection in error:::", error);
      });

        console.log("mongo DB connected");


      mongoose.set('debug', function(collectionName, method, query, doc, options) {

        console.log(collectionName + '.' + method, JSON.stringify(query), doc)
    
        // log.info({
        //     dbQuery: set
        // });
    });

  } catch (e) {
    console.error(e, "error");
  } finally {
    // await client.close();
  }
};

export default connectDB;
/>

#### Get all items


#### add(num1, num2)

Takes two numbers and returns the sum.




## To Run The Project

To Run The Project

```bash
  npm run dev

Contributing

Contributions are always welcome!

Note:

  1. Don't Create Pull Request to update "readme.md" File.
  2. Maintain proper folder structure.
  3. In case you need to add an external package, install it by using npm. Don't push the complete package file here

Steps to run the project

  • Fork the repo
  • Clone into local
  • Run npm install
  • Run npm run dev

Issues to fix:

  • Fix all the buttons
  • Improve box-shadow in light mode
  • Make dark mode as default

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.

πŸ”— Links

portfolio linkedin

Tech Stack

Server: Node.js, Express.js Auth, JwToken

Examples

import CONSTANTS from '../constants/index.js';

import UserRoutes from '../modules/user/user.routes'

const routes = (app)=>{
   
app.use(`${CONSTANTS.API_URI}/user`,UserRoutes);

// console.log(app , "::dddddddddd")
}
export default routes;
/>

(Back to top)

Contributors πŸŽ‡

Credits goes to these people:

Our Contributors 🌱

node.js-_microservices's People

Contributors

sazamansari avatar dependabot[bot] avatar azmatraza avatar hereisswapnil avatar rish-02 avatar s-ishita avatar sagnik3788 avatar abdul535 avatar k-deepak04 avatar divyanshinarang avatar imrannawar avatar nishitbaria avatar satyamsinghk avatar anurag-int avatar harmeetsingh11 avatar lovetyagi-17 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.