This guide explains how to run the project with SQL Server using the Remote - Containers extension in Visual Studio Code.
- Docker must be installed on your machine.
- Visual Studio Code (VS Code) must be installed.
- The Remote - Containers extension should be installed in VS Code.
Ensure your project directory contains the docker-compose.yml
and devcontainer.json
files.
-
Start Docker: Make sure Docker is running on your machine.
-
Open Project in VS Code:
- Open your project folder in VS Code.
-
Reopen in Container:
- Press
F1
to open the command palette. - Type and select "Remote-Containers: Reopen in Container".
- VS Code will build the container based on your configuration files. This may take a few minutes.
- Press
-
Working with SQL Server:
- The SQL Server instance is accessible on port
14330
. - Connect using a SQL client with the address
localhost,14330
, usernamesa
, and passwordP@assword123
.
- The SQL Server instance is accessible on port
-
Development:
- Develop within the container. All defined extensions and settings in
devcontainer.json
will be available. - Run
npm install
- Run
node index.js
- Develop within the container. All defined extensions and settings in
Always use the "Reopen in Container" option in VS Code to work within the Docker container environment for consistency and reproducibility.
Happy Coding!
English script for video demo
- Map order, customer, orderLine, deliveryAddress
- Insert customers wolfgang, harry and Hermine. Console.dir
- Insert orders magic flute, [broomstick, magic wand], magic wand.
- SaveChanges: getOne where customer.name.eq('Hermine'). Change orderDate and add product book of monsters.
- getMany any product broomstick
- getMany all product contains magic
- not
- any magic or postalPlace Hamp
- orderBy order orderDate desc, orderline orderBy product desc
- limit
Norwegian script for video demo
- Map order, customer, orderLine, deliveryAddress
- Insert customers wolfgang, harry and Hermine. Console.dir
- Insert orders tryllefløyte, [sopelime, tryllestav], bok om monster.
- SaveChanges: getOne where customer.name.eq('Hermine'). Change orderDate and add product sopelime.
- getMany any product sopelime
- getMany all product contains trylle
- not
- any trylle or postalPlace Hamp
- orderBy order orderDate desc, orderline orderBy product desc
- limit