Installation
Installation is simple, following normal Node expectations.
With NPM
cd <your-project-directory>
npm install tedious
Of course, if your project's package.json declares a dependency on tedious then it's even simpler. .
cd <your-project-directory>
npm install
Manually
Copy the directory containg tedious in to your project'snode_modules
directory.
Installing SQL Server on Docker in Windows
- Checkout the official docker images
-
In Powershell:
- Pull the docker image:
docker pull mcr.microsoft.com/mssql/server:2019-latest
- Start the SQL Server:
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=password_01" -p 1433:1433 -v sqldatavol:/var/opt/mssql -d
-
Note: Data should be preserved in sqldatavol in the event the container is stopped or removed. To
check, run
Docker volume ls
or visit here for more information about data persistence.
-
Note: Data should be preserved in sqldatavol in the event the container is stopped or removed. To
check, run
- In your javascript file running tedious, set the config to something like:
- Verify that the server has been setup and `tedious` is able to connect by running the query:
- Expected output:
42 hello world 1 rows returned DONE!
- Pull the docker image: