From 4cd5c2e4f21672dd94c989b7387bb7e01c57bfd9 Mon Sep 17 00:00:00 2001 From: Stepan Usatiuk Date: Fri, 20 Aug 2021 20:14:17 +0000 Subject: [PATCH] add a launch config for backend --- .vscode/launch.json | 16 ++++++++++++++++ README.md | 19 ++++++++++--------- 2 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8aef9bc --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Backend", + "request": "launch", + "runtimeArgs": ["run-script", "ts-node-dev"], + "runtimeExecutable": "npm", + "skipFiles": ["/**"], + "type": "pwa-node" + } + ] +} diff --git a/README.md b/README.md index 9491301..3118b98 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # writer + A simple web/markdown-based note taking app You can take a look at the hosted version on heroku: https://ustk-writer.herokuapp.com @@ -21,7 +22,7 @@ only need to change the database connection settings) Open the workspace in a remote docker container using VSCode - everything should be set up for you. You just need to rename `ormconfig.example.json` to `ormconfig.json` -Also, you need to run database migrations with +Also, you need to **run database migrations** with `npm run typeorm-dev -- migration:run` Then start with `npm run dev` and visit http://localhost:1234 (Parcel dev server @@ -34,18 +35,18 @@ docker-compose example in `dockercomposeexample` folder ### Config options (for docker container) -* `PORT` - web port +- `PORT` - web port -* `TYPEORM_HOST` - mariadb hostname +- `TYPEORM_HOST` - mariadb hostname -* `TYPEORM_USERNAME` - mariadb username +- `TYPEORM_USERNAME` - mariadb username -* `TYPEORM_PASSWORD` - mariadb password +- `TYPEORM_PASSWORD` - mariadb password -* `TYPEORM_DATABASE` - mariadb database +- `TYPEORM_DATABASE` - mariadb database -* `TYPEORM_PORT` - mariadb port +- `TYPEORM_PORT` - mariadb port -* `JWT_SECRET` - JWT secret - set it to something random +- `JWT_SECRET` - JWT secret - set it to something random -* `HTTPS` (`"yes"`/`"no"`) - whether the server enforce HTTPS or not +- `HTTPS` (`"yes"`/`"no"`) - whether the server enforce HTTPS or not