forked from microsoft/vscode-remote-try-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
792 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#----------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See LICENSE in the project root for license information. | ||
#----------------------------------------------------------------------------------------- | ||
|
||
FROM node:8 | ||
|
||
# Install git, process tools | ||
RUN apt-get update && apt-get -y install git procps | ||
|
||
# Install yarn | ||
RUN apt-get install -y curl apt-transport-https lsb-release \ | ||
&& curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - \ | ||
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y yarn | ||
|
||
# Install tslint and typescript | ||
RUN npm install -g tslint typescript | ||
|
||
# Clean up | ||
RUN apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "Node.js Sample", | ||
"dockerFile": "Dockerfile", | ||
"appPort": 3000, | ||
"extensions": [ | ||
"ms-vscode.vscode-typescript-tslint-plugin" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -328,3 +328,7 @@ ASALocalRun/ | |
|
||
# MFractors (Xamarin productivity tool) working folder | ||
.mfractor/ | ||
|
||
*.DS_Store | ||
|
||
out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Program", | ||
"program": "${workspaceFolder}/out/server.js", | ||
"cwd": "${workspaceFolder}", | ||
"preLaunchTask": "compile" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "compile", | ||
"type": "shell", | ||
"command": "npm run compile", | ||
"problemMatcher": "$tsc" | ||
|
||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
# Node.js Sample Project for Visual Studio Remote - Containers | ||
|
||
# Contributing | ||
This is a sample project to go along with the "try" quick start for the VS Code Remote - Containers extension. | ||
|
||
Using the sample: | ||
|
||
1. **[Windows]** Disable automatic line ending conversion for Git on the *Windows side* (given Linux and Windows use different line endings). Run: `git config --global core.autocrlf false` | ||
2. Follow the steps at [https://aka.ms/vsocde-remote/containers/getting-started](https://aka.ms/vsocde-remote/containers/getting-started). | ||
3. Run `yarn install` | ||
4. Launch the application, edit, and try things out! | ||
|
||
Other samples and dev container definitions: | ||
- [Node.js](https://github.com/Microsoft/vscode-dev-containers/tree/master/containers/javascript-node-lts) | ||
- [Node.js & Mongo DB](https://github.com/Microsoft/vscode-dev-containers/tree/master/containers/javascript-node-lts-mongo) | ||
- [Node.js & TypeScript](https://github.com/Microsoft/vscode-dev-containers/tree/master/containers/typescript-node-lts) | ||
- [Azure Functions & Node.js](https://github.com/Microsoft/vscode-dev-containers/tree/master/containers/azure-functions-node-lts) | ||
|
||
## Contributing | ||
|
||
This project welcomes contributions and suggestions. Most contributions require you to agree to a | ||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us | ||
|
@@ -12,3 +28,8 @@ provided by the bot. You will only need to do this once across all repos using o | |
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or | ||
contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | ||
|
||
## License | ||
|
||
Copyright © Microsoft Corporation All rights reserved.<br /> | ||
Licensed under the MIT License. See LICENSE in the project root for license information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "docker_web_app", | ||
"private": true, | ||
"version": "1.0.0", | ||
"description": "Node.js on Docker", | ||
"author": "First Last <[email protected]>", | ||
"main": "out/server.js", | ||
"scripts": { | ||
"compile": "node_modules/.bin/tsc -p tsconfig.json", | ||
"start": "node out/server.js" | ||
}, | ||
"dependencies": { | ||
"express": "^4.16.1" | ||
}, | ||
"devDependencies": { | ||
"@types/express": "^4.16.0", | ||
"tslint": "^5.11.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/*----------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE in the project root for license information. | ||
*---------------------------------------------------------------------------------------*/ | ||
|
||
import * as express from 'express'; | ||
|
||
// Constants | ||
const PORT = 3000; | ||
const HOST = '0.0.0.0'; | ||
|
||
// App | ||
const app = express(); | ||
app.get('/', (req, res) => { | ||
res.send('Hello world\n'); | ||
}); | ||
|
||
app.listen(PORT, HOST); | ||
console.log(`Running on http://${HOST}:${PORT}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"module": "commonjs", | ||
"strict": true, | ||
"outDir": "out", | ||
"sourceMap": true | ||
}, | ||
"exclude": [ | ||
"out", | ||
"node_modules" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"defaultSeverity": "error", | ||
"extends": [ | ||
"tslint:recommended" | ||
], | ||
"jsRules": {}, | ||
"rules": { | ||
"quotemark": false, | ||
"no-console": false, | ||
"indent": [ | ||
true, | ||
"tabs" | ||
] | ||
}, | ||
"rulesDirectory": [] | ||
} |
Oops, something went wrong.