add a launch config for backend

This commit is contained in:
2021-08-20 20:14:17 +00:00
parent 1ac7e53ef5
commit 4cd5c2e4f2
2 changed files with 26 additions and 9 deletions

16
.vscode/launch.json vendored Normal file
View File

@@ -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": ["<node_internals>/**"],
"type": "pwa-node"
}
]
}

View File

@@ -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