What’s New

server

Developer Tools

server release notes.

Latest 1.0.17 · by serverWebsitefranciscop/server

Changelog

1.0.16

Added hook for options within a plugin options so you can have a subschema in a plugin option schema. Example:

// For the plugin @server/auth
module.exports = {
  name: 'auth',
  callback: { type: String },
  options: {
    facebook: {

      // Note: these 2 should be not needed in the future
      default: {},
      extend: true,

      // This is the new thing that you can do:
      options: {
        id: { type: String, env: 'FACEBOOK_ID' },
        secret: { type: String, env: 'FACEBOOK_SECRET' }
      }

    }
  }
};

Then when using the plugin it will be like this:

server({
  auth: {
    facebook: {
      id: 'whatever',
      secret: 'whatever'
    }
  }
});

But of course for this specific example you'd use the .env:

# .env
FACEBOOK_ID=whatever
FACEBOOK_SECRET=whatever

1.0.7

Yarn and npm have different path resolution. Manually attached path-to-regexp-wrap, which fixes #43

This was giving inconsistent results when using yarn (vs the expected one with npm):

server(
  get('*', (ctx) => {
    return status(200);
  })
);

1.0.9

Better error handling and warnings when there is no response from the server.

1.0.10

Do not show a warning if only the status was set but no body was set. Fixes #46

1.0.12

Remove the default body that was set by express when only an status code was sent by making it explicit with status(NUMBER).send(). Also fixes #46