Skip to content

Commit

Permalink
feat: create devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
luizchaves committed Oct 10, 2024
1 parent 0bfe328 commit 22913f3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG VARIANT=20-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

RUN npm install -g pnpm
37 changes: 37 additions & 0 deletions .devcontainer/invest-app-auth/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "Invest App Auth",
"build": {
"dockerfile": "../Dockerfile",
"args": {
"VARIANT": "20-bullseye"
}
},

"workspaceFolder": "/workspaces/lp2/public/codes/expressjs/invest-app-auth",

"portsAttributes": {
"3000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},

"forwardPorts": [3000],

"postCreateCommand": "pnpm install && cd /workspaces/lp2/public/codes/expressjs/invest-app-auth && pnpm run dev",

"waitFor": "postCreateCommand",

"postAttachCommand": {
"Server": "pnpm start --host"
},

"customizations": {
"codespaces": {
"openFiles": ["src/index.js"]
},
"vscode": {
"extensions": ["esbenp.prettier-vscode"]
}
}
}
3 changes: 2 additions & 1 deletion src/content/classnotes/expressjs/auth/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import CodeTree from '../../../../components/CodeTree.astro';

# {frontmatter.title}

[Código Fonte](https://github.com/ifpb/lp2/tree/main/public/codes/expressjs/invest-app-auth)
{/* [Código Fonte](https://github.com/ifpb/lp2/tree/main/public/codes/expressjs/invest-app-auth) */}
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/ifpb/lp2?devcontainer_path=.devcontainer/invest-app-auth/devcontainer.json)

<CodeTree src="/codes/expressjs/invest-app-auth" githubUrl={true} />

Expand Down

0 comments on commit 22913f3

Please sign in to comment.