Skip to content

Commit

Permalink
ts => js
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuxel committed Apr 18, 2019
1 parent 63f41cf commit 74d2279
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 380 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ RUN apt-get install -y curl apt-transport-https lsb-release \
&& apt-get update \
&& apt-get install -y yarn

# Install tslint and typescript
RUN npm install -g tslint typescript
# Install eslint
RUN npm install -g eslint

# Clean up
RUN apt-get autoremove -y \
Expand Down
21 changes: 21 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"root": true,
"env": {
"node": true,
"es6": true
},
"rules": {
"no-console": 0,
"eqeqeq":"warn",
"no-cond-assign": 0,
"no-unused-vars": 1,
"no-extra-semi": "warn",
"semi": "warn"
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
}
}
4 changes: 1 addition & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/out/server.js",
"cwd": "${workspaceFolder}",
"preLaunchTask": "compile"
"program": "${workspaceFolder}/server.js"
}
]
}
14 changes: 0 additions & 14 deletions .vscode/tasks.json

This file was deleted.

10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
{
"name": "docker_web_app",
"private": true,
"version": "1.0.0",
"description": "Node.js on Docker",
"author": "First Last <[email protected]>",
"main": "out/server.js",
"main": "server.js",
"scripts": {
"compile": "node_modules/.bin/tsc -p tsconfig.json",
"start": "node out/server.js"
"start": "node server.js"
},
"dependencies": {
"express": "^4.16.1"
},
"devDependencies": {
"@types/express": "^4.16.0",
"tslint": "^5.11.0"
}
}
21 changes: 21 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

'use strict';

const express = require('express');

// Constants
const PORT = 3000;
const HOST = '0.0.0.0';

// App
const app = express();
app.get('/', (req, res) => {
res.send('Hello remote world!\n');
});

app.listen(PORT, HOST);
console.log(`Running on http://${HOST}:${PORT}`);
19 changes: 0 additions & 19 deletions src/server.ts

This file was deleted.

13 changes: 0 additions & 13 deletions tsconfig.json

This file was deleted.

16 changes: 0 additions & 16 deletions tslint.json

This file was deleted.

Loading

0 comments on commit 74d2279

Please sign in to comment.