Skip to content

Run multiple micro servers and a front proxy at a time

Notifications You must be signed in to change notification settings

jfmengels/micro-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

micro-cluster

Run multiple micro servers and a front proxy at a time, with a simple configuration file.

Example

Create a config file like the following.

export default {
  services: {
    myService: {
      path: 'index.js',
      env: { NODE_ENV: 'production' }
    },
    woot: 'woot.js'
  },

  locations: {
    '^/path-regex/to/serve/?$': {
      rewrite: ['^(.*)$', '$1/rewritten'],
      proxySetHeaders: { 'X-CUSTOM-HEADER': '1' },
      proxy: 'myService'
    }
    '^/woot/?$': 'woot'
  }
}

Run servers.

$ micro-cluster -p 3000 app.js

About

Run multiple micro servers and a front proxy at a time

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published