fastify-static
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -137,2 +137,3 @@ 'use strict' | ||
pumpSendToReply(this.request, this, filePath, rootPath) | ||
return this | ||
}) | ||
@@ -139,0 +140,0 @@ } |
{ | ||
"name": "fastify-static", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "Plugin for serving static files as fast as possible.", | ||
@@ -43,3 +43,3 @@ "main": "index.js", | ||
"eslint-plugin-typescript": "^0.14.0", | ||
"fastify": "^3.0.0-rc.5", | ||
"fastify": "^3.0.0", | ||
"fastify-compress": "^3.0.0", | ||
@@ -53,3 +53,3 @@ "handlebars": "^4.7.6", | ||
"tap": "^14.10.7", | ||
"tsd": "^0.12.0", | ||
"tsd": "^0.13.1", | ||
"typescript": "^3.5.2" | ||
@@ -56,0 +56,0 @@ }, |
@@ -25,7 +25,7 @@ # fastify-static | ||
fastify.get('/another/path', function (req, reply) { | ||
reply.sendFile('myHtml.html') // serving path.join(__dirname, 'public', 'myHtml.html') directly | ||
return reply.sendFile('myHtml.html') // serving path.join(__dirname, 'public', 'myHtml.html') directly | ||
}) | ||
fastify.get('/path/with/different/root', function (req, reply) { | ||
reply.sendFile('myHtml.html', path.join(__dirname, 'build')) // serving a file from a different root location | ||
return reply.sendFile('myHtml.html', path.join(__dirname, 'build')) // serving a file from a different root location | ||
}) | ||
@@ -32,0 +32,0 @@ |
@@ -630,3 +630,3 @@ 'use strict' | ||
fastify.get('/foo/bar', (request, reply) => { | ||
reply.sendFile('index.html') | ||
return reply.sendFile('index.html') | ||
}) | ||
@@ -678,7 +678,7 @@ | ||
fastify.get('/foo/bar', function (req, reply) { | ||
reply.sendFile('/index.html') | ||
return reply.sendFile('/index.html') | ||
}) | ||
fastify.get('/root/path/override/test', (request, reply) => { | ||
reply.sendFile('/foo.html', path.join(__dirname, 'static', 'deep', 'path', 'for', 'test', 'purpose')) | ||
return reply.sendFile('/foo.html', path.join(__dirname, 'static', 'deep', 'path', 'for', 'test', 'purpose')) | ||
}) | ||
@@ -685,0 +685,0 @@ |
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
195442
2632