Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastify-mssql

Package Overview
Dependencies
Maintainers
34
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-mssql

Fastify Plugin to manage MSSQL connections

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
101
decreased by-44.2%
Maintainers
34
Weekly downloads
 
Created
Source

fastify-mssql

Fastify MSSQL Plugin

Installation

Just run

npm install fastify-mssql

Usage

Example

const Fastify = require('fastify')

const app = Fastify({
  logger: true
})

const mssqlPlugin = require('fastify-mssql')
app.register(mssqlPlugin, {
  server: 'my-host',
  port: 1433,
  user: 'my-user',
  password: 'my-password',
  database: 'my-database'
})

app.get('/users', async function (req, reply) {
  try {
    await app.mssql.pool.connect();
    const res = await app.mssql.pool.query('SELECT * FROM users');
    return { users: res.recordset }
  } catch (err) {
    return err;
  }
})

app.listen(3000)

Keywords

FAQs

Package last updated on 25 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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