Tba.
Text
Update the @supercharge/framework
dependency in your package.json
file to 1.0-beta1
.
Text
Text
const Fs = require('@supercharge/framework/filesystem')
// before
if (await Fs.access(file)) {
//
}
// after
if (await Fs.canAccess(file)) {
//
}
Text
Text
Text
class Middleware {
constructor(server) {
this.server
}
onRequest(request, h) {
// your middleware functionality
return h.continue
}
}
module.exports = Middleware
Text
canAccess()
lastAccessed()
lastModified()
updateTimestamps()
Text
Supercharge 1.0-beta1 includes a handful of new Handlebars helpers.
The new csrfToken
helper returns the raw CSRF token value. This is useful single-page applications when using an HTTP library that includes the CSRF tokens to restful requests.
<meta name="csrf-token" content="{{csrfToken}}">