…
|
||
---|---|---|
.. | ||
SqlServerColumnstoreSample | ||
SqlServerSample | ||
SqlServerSequelizeSample | ||
README.md |
README.md
Get started with SQL Server and Node.js on Windows
Get started quickly with developing applications in Node.js on Windows with SQL Server
Contents
About this sample
Before you begin
Run this sample
Sample details
Disclaimers
Related links
About this sample
- Applies to: SQL Server 2016 (or higher)
- Workload:
- CRUD with Node.js
- CRUD with Sequelize ORM
- Performance improvements with Columnstore
- Programming Language: JavaScript
Before you begin
To run this sample, you need the following prerequisites.
Software prerequisites:
- SQL Server 2016 (or higher)
- Node.js
- Sequelize ORM
- A text editor
- sql-cli
Run this sample
-
Create the database to be used for the rest of the samples. From your command prompt, run the following. Update the username and password with your own.
mssql -s localhost -u sa -p your_password -q "CREATE DATABASE SampleDB;"
CRUD via Node.js (SqlServerSample)
-
In your favorite text editor, open the connect.js file in the SqlServerSample folder and update the connection string username and password with your own.
-
From your terminal, run the project by performing the following command:
node connect.js
-
From sql-cli, create the sample data to be used in the CRUD sample. Update the username and password with your own.
mssql -s localhost -u sa -p your_password -d SampleDB -T 60000 .run ./CreateTestData.sql
-
From your terminal, run the CRUD sample by performing the following command:
node crud.js
CRUD via Sequelize (SqlServerSequelizeSample)
-
In your favorite text editor, open the orm.js file in the SqlServerSequelizeSample folder and update the connection string username and password with your own.
-
From your command prompt, connect to your database and then create the sample data to be used in the columnstore sample. Update the username and password with your own.
node orm.js
Performance improvements with Columnstore (SqlServerColumnstoreSample)
-
In your favorite text editor, open the columnstore.js file in the SqlServerColumnstoreSample folder and update the connection string username and password with your own.
-
From your command prompt, connect to your database and then create the sample data to be used in the columnstore sample. Update the username and password with your own.
mssql -s localhost -u sa -p your_password -d SampleDB -T 60000 .run ./CreateSampleTable.sql
-
From your terminal, run the CRUD sample by performing the following command:
node columnstore.js
Sample details
Please visit the Node.js on Windows tutorial to run through the sample in full with more detail.
Disclaimers
The scripts and this guide are provided as samples. They are not part of any Azure service and are not covered by any SLA or other Azure-related agreements. They are provided as-is with no warranties express or implied. Microsoft takes no responsibility for the use of the scripts or the accuracy of this document. Familiarize yourself with the scripts before using them.
Related Links
For more information, see these articles:
- To see more getting started tutorials, visit our tutorials page