XYZ API
The XYX API module exports the api function which serves as the entry point for all XYZ API requests.
A node.js express app will require the api module and reference the exported api method for all request routes.
const app = express()
const api = require('./api/api')
app.get(`/`, api)
- Source
Requires
Methods
(async, inner) api(req, res)
The XYZ api method will validate request parameter.
The API module method requires the user/auth module to authenticate private API requests.
Requests are passed to individual API modules from the api() method.
- Source