Socket
Socket
Sign inDemoInstall

microservice-arch-generator

Package Overview
Dependencies
1
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    microservice-arch-generator

This is a microservice architecture generator


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Install size
67.6 kB
Created
Weekly downloads
 

Readme

Source

microservices-architechture

This is a microservice architecture generator

Getting started

Use below command to scaffold basic microservice architecture

npx microservice-arch-generator mag

Run following command one by one :

cd gateway
npm install
npm run dev
  • Open another terminal window.
cd users/src/node
npm install
npm run dev

Folder Structure Conventions

.
├── gateway                     # Main app to load other services(i.e., users)
     ├── src                    # All the source code inside this folder
          ├── config
                 ├── config.development.json
                 └── config.production.json
          └── index.js
     └── package.json
└── users                       # Demo service for usage
     ├── src                    # All the source code inside this folder
          ├── node              # contains a demo node app
               ├── assets
               ├── bundle
               ├── client
               ├── config
                      └── swagger
                            └── swagger.json
               ├── controllers
                      └── usersController.js
               ├── helpers
               ├── models
               ├── routes
                      └── usersRoutes.js
               ├── services
                      └── UsersService.js
               ├── index.js
               ├── package.json
               └── webpack.config.js
          └── react           # provided folder to create a react app
     └── package.json

Bundling

Use below commands to bundle whole node application inside users

cd users/src/node
npm run build

Generating service (alpha version)

Use below command to generate a service with your service name

npx microservice-arch-generator mag --create-service=your_service_name
  • While using this feature make sure that inside gateway folder you register new service inside config file(s). and very importantly remember to put root path("/") prefix object at the bottom(default users route)

  • Note: This feature is in alpha version so it will generate files with given serivce_name but content inside file will just be a simple copy of users service folder.

Keywords

FAQs

Last updated on 19 May 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc