-
Install Docker for Windows or Docker Toolbox.
-
Create a Docker volume:
> docker volume create --name=mssql-volume
- In the localDev/ directory, run
docker-compose up -d
. When running this the first time, it will download the required Docker images. Subsequent runs should start up immediately. - If you are using Docker Toolbox on Win10 Home, make sure you map ports correctly.
- SQL Server should now be running and listening on port
1401
. - Connect with SSMS, using the login information:
- Server type: Database Engine
- Server name:
127.0.0.1,1401
- Authentication: SQL Server Authentication
- User:
SA
- Password: (specified in
localDev/docker-compose.yml
)
Reference the SQL Server on Docker documentation.
- Install the dotnet global tool for RoundhousE:
> dotnet tool install --global dotnet-roundhouse --version 1.1.0
- In Powershell, run migrations (optionally inserting test data):
PS> cd .\packages\databases\appdb\
PS> .\deployAppDb.ps1 -Environment "TEST"
Specify "TEST" as the environment to seed the database with test data. The default is "PROD".
-
Copy
.env.default
to a new file named.env
and update its config values. -
Install Yarn. On Windows, using Chocolatey is the easiest way to install and keep Yarn up to date.
> choco install yarn
- Install Lerna globally:
> yarn global add lerna
If running lerna
doesn't work, make sure you add the result of yarn global bin
to your $PATH in your system environment variables, not just for your user.
- Install dependencies:
> yarn install
- Run API:
> yarn api:start
TODO
$ yarn install
$ yarn build
$ yarn package
This will:
- Install dependencies.
- Execute the
build
script specified in the package.json of each package under thepackages/
directory. - Execute the
package
script in each package, outputting a dist/ folder with all of its dependencies.
# Run all tests
> yarn test
# To specify a path or specific test file to run, add it as a parameter
> yarn test packages/api/
# You can also automatically re-run tests when files are changed
> yarn test --watch
There are also launch configurations set up for running tests in VS Code.
See lerna add:
# add lodash as dependency to @mps/api package
> lerna add lodash --scope @mps/api
# add lodash as dependency to all packages
> lerna add lodash
Or just navigate to the subdirectory and use yarn add
as usual.
Currently this must be done directly with Yarn workspaces:
> yarn workspace @mps/api remove helmet
Or just navigate to the subdirectory and use yarn remove
as usual.