Skip to content

Commit

Permalink
Add Node basics sample
Browse files Browse the repository at this point in the history
  • Loading branch information
rstropek committed Jul 25, 2024
1 parent e8ed1ba commit a9c0d97
Show file tree
Hide file tree
Showing 10 changed files with 496 additions and 0 deletions.
13 changes: 13 additions & 0 deletions labs/017-basics-nodejs/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

[*.js,*.ts]
quote_type = single
7 changes: 7 additions & 0 deletions labs/017-basics-nodejs/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 2,
"printWidth": 120
}
19 changes: 19 additions & 0 deletions labs/017-basics-nodejs/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// 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": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"node_modules/**"
],
"preLaunchTask": "npm: build",
"program": "dist/main.js",
"console": "integratedTerminal"
}
]
}
16 changes: 16 additions & 0 deletions labs/017-basics-nodejs/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build",
"detail": "tsc"
}
]
}
308 changes: 308 additions & 0 deletions labs/017-basics-nodejs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions labs/017-basics-nodejs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "017-basics-nodejs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"build": "tsc",
"start": "npm run build && node ./dist/main.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/node": "^20.11.30",
"typescript": "^5.4.3"
},
"dependencies": {
"dotenv": "^16.4.5",
"openai": "^4.29.2"
}
}
Loading

0 comments on commit a9c0d97

Please sign in to comment.