fastify-static
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -50,2 +50,3 @@ 'use strict' | ||
if (!opts.prefix) opts.prefix = '/' | ||
const prefix = opts.prefix[opts.prefix.length - 1] === '/' ? opts.prefix : (opts.prefix + '/') | ||
@@ -52,0 +53,0 @@ fastify.get(prefix + '*', function (req, reply) { |
{ | ||
"name": "fastify-static", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Plugin for serving static file as fast as possible Edit", | ||
@@ -33,3 +33,3 @@ "main": "index.js", | ||
"fastify": "^0.29.0", | ||
"coveralls": "^2.13.1", | ||
"coveralls": "^3.0.0", | ||
"pre-commit": "^1.2.2", | ||
@@ -36,0 +36,0 @@ "request": "^2.81.0", |
@@ -301,1 +301,8 @@ 'use strict' | ||
}) | ||
t.test('prefix default', t => { | ||
t.plan(1) | ||
const pluginOptions = {root: path.join(__dirname, 'static')} | ||
const fastify = require('fastify')({logger: false}) | ||
t.doesNotThrow(() => fastify.register(fastifyStatic, pluginOptions)) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16582
338