Socket
Socket
Sign inDemoInstall

fastify-static

Package Overview
Dependencies
Maintainers
8
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-static - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

1

index.js

@@ -137,2 +137,3 @@ 'use strict'

pumpSendToReply(this.request, this, filePath, rootPath)
return this
})

@@ -139,0 +140,0 @@ }

6

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc