0.0.1 • Published 6 years ago

@repit/q-localize v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Repit Q-Localize

R/Q Middleware for AWS Lambda localization.

About

This module is a wrapper for @repit/lambda-localize.

Installation

$ npm install @repit/q-localize --save

Requirements

Usage

'use strict'

const q = require('@repit/q')()
const localize = require('@repit/q-localize')

q(localize({
  // Use caching.
  cache: true // Default: false
}))

q((req, res) => {
  // Send a success message.
  res.localize('Message:UserCreated')

  // Send an error message.
  res.code(400).localize('Error:InvalidUserName')
})

exports.handler = q.handler

License

MIT