Skip to content

Commit 77eafe2

Browse files
committed
project setup
0 parents  commit 77eafe2

16 files changed

+1520
-0
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [flolu]

.github/debugging.png

31.8 KB
Loading

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: test
2+
on: [push, pull_request]
3+
jobs:
4+
integration-tests:
5+
runs-on: ubuntu-20.04
6+
steps:
7+
- name: Checkout
8+
uses: actions/checkout@v2
9+
10+
- name: Dummy test
11+
run: echo "Dummy test"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"ms-azuretools.vscode-docker",
4+
"dbaeumer.vscode-eslint",
5+
"esbenp.prettier-vscode",
6+
"streetsidesoftware.code-spell-checker"
7+
]
8+
}

.vscode/launch.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "attach",
7+
"name": "App1",
8+
"protocol": "inspector",
9+
"address": "0.0.0.0",
10+
"port": 9229,
11+
"restart": true,
12+
"sourceMaps": true,
13+
"localRoot": "${workspaceFolder}",
14+
"remoteRoot": "/",
15+
"sourceMapPathOverrides": {
16+
"/*": "${workspaceFolder}/*"
17+
}
18+
},
19+
{
20+
"type": "node",
21+
"request": "attach",
22+
"name": "App2",
23+
"protocol": "inspector",
24+
"address": "0.0.0.0",
25+
"port": 9230,
26+
"restart": true,
27+
"sourceMaps": true,
28+
"localRoot": "${workspaceFolder}",
29+
"remoteRoot": "/",
30+
"sourceMapPathOverrides": {
31+
"/*": "${workspaceFolder}/*"
32+
}
33+
}
34+
]
35+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cSpell.words": ["Flaticon", "Freepik", "Parens"]
3+
}

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<div align="center">
2+
<a href="https://github.com/flolu/auth">
3+
<img width="100px" height="auto" src="./.github/debugging.png" />
4+
</a>
5+
<br>
6+
<h1>Docker Typescript Debugging</h1>
7+
<p>Example for Debugging Node.js + Typescript Running inside Docker Containers with Hot Reload</p>
8+
<!-- <a href="https://youtu.be/XXX">
9+
<img width="320px" height="180px" src="https://img.youtube.com/vi/XXX/mqdefault.jpg" style="border-radius: 1rem;" />
10+
<p>Watch the YouTube Tutorial</p>
11+
</a> -->
12+
</div>
13+
14+
# Usage
15+
16+
**Recommended OS**: Ubuntu 20.04 LTS
17+
18+
**Requirements**: Yarn, Docker, Docker Compose
19+
20+
**Setup**
21+
22+
- `yarn install`
23+
24+
**Development**
25+
26+
- `make dev` or `yarn dev` (Start development backend services, http://localhost:3000)
27+
- `Ctrl+F5` (Choose which container to debug)
28+
29+
# Codebase
30+
31+
- [`docker-compose.yml`](docker-compose.yml) backend development environment
32+
- [`.vscode/launch.json`](.vscode/launch.json) launch configuration for debuggers
33+
34+
# Credits
35+
36+
<div>Icons made by <a href="https://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a></div>

app1.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import {sendResponse} from '@lib1'
2+
import express from 'express'
3+
4+
const app1 = express()
5+
6+
app1.get('*', (_req, res) => {
7+
sendResponse(res, 'app1 test 1 2 3 4')
8+
})
9+
10+
app1.listen(3000)

app2.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import {sendResponse} from '@lib1'
2+
import express from 'express'
3+
4+
const app2 = express()
5+
6+
app2.get('*', (_req, res) => {
7+
sendResponse(res, 'app2')
8+
})
9+
10+
app2.listen(3000)

0 commit comments

Comments
 (0)