Server plugins allow developers to start and stop custom servers as part of the serve lifecycle of Greenwood. These lifecycles provide the ability to do things like:
Although JavaScript is loosely typed, a server "interface" has been provided by Greenwood that you can use to start building your own server plugins. Effectively you just have to provide two methods
start - function to run to start your serverstop  - function to run to stop / teaddown your serverThey can be used in a greenwood.config.js just like any other plugin type.
const pluginMyServerFoo = require('./plugin-my-server');
module.exports = {
  ...
  plugins: [
    pluginMyServer()
  ]
}
The below is an excerpt of Greenwood's internal LiveReload server plugin.
class LiveReloadServer extends ServerInterface {
  constructor(compilation, options = {}) {
    super(compilation, options);
    
    this.liveReloadServer = livereload.createServer({ /* options */});
  }
  async start() {
    const { userWorkspace } = this.compilation.context;
    return this.liveReloadServer.watch(userWorkspace, () => {
      console.info(`Now watching directory "${userWorkspace}" for changes.`);
      return Promise.resolve(true);
    });
  }
}
module.exports = (options = {}) => {
  return {
    type: 'server',
    name: 'plugin-livereload',
    provider: (compilation) => new LiveReloadServer(compilation, options)
  }
};