diff --git a/.eslintrc b/.eslintrc index 791d0f7..bc12af8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,3 +1,6 @@ { - "extends": "./node_modules/eslint-config/.eslintrc" + "extends": "./node_modules/eslint-config/.eslintrc", + "env": { + "node": true + } } diff --git a/.gitignore b/.gitignore index c9851a9..e920c16 100644 --- a/.gitignore +++ b/.gitignore @@ -31,5 +31,3 @@ node_modules # Optional REPL history .node_repl_history - -site/ diff --git a/README.md b/README.md index d3a1a9e..00264d2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# host-container +# host-container [![CircleCI](https://circleci.com/gh/RealOrangeOne/host-container/tree/master.svg?style=svg)](https://circleci.com/gh/RealOrangeOne/host-container/tree/master) Container to host simple static applications using a node server, so files can be deployed using rsync ## Why is this a thing? diff --git a/etc/environments/deployment/env b/etc/environments/deployment/env deleted file mode 100644 index cbde1cc..0000000 --- a/etc/environments/deployment/env +++ /dev/null @@ -1 +0,0 @@ -NODE_ENV=production diff --git a/etc/environments/deployment/procfile b/etc/environments/deployment/procfile deleted file mode 100644 index 063b78f..0000000 --- a/etc/environments/deployment/procfile +++ /dev/null @@ -1 +0,0 @@ -web: npm start diff --git a/package.json b/package.json index c748442..df70f4d 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,11 @@ "main": "server.js", "scripts": { "test": "eslint server.js", - "postinstall": "mkdir -p site/", "start": "node server.js" }, + "engines": { + "node": "5.11.1" + }, "repository": { "type": "git", "url": "git+https://github.com/RealOrangeOne/host-container.git" @@ -18,7 +20,7 @@ }, "homepage": "https://github.com/RealOrangeOne/host-container#readme", "dependencies": { - "express": "=4.13.3" + "express": "=4.14.0" }, "devDependencies": { "eslint": "=1.9.0", diff --git a/server.js b/server.js index bcdbfd7..3e8d344 100644 --- a/server.js +++ b/server.js @@ -7,7 +7,7 @@ const directory = /\/$/; const allFiles = /.*/; const expressConfig = { - dotfiles: 'deny', + dotfiles: 'ignore', index: false, redirect: true }; @@ -32,6 +32,5 @@ app.use( ); const server = app.listen(PORT, function () { - const serverPort = server.address().port; - console.log('Server started on port ' + serverPort); + console.log('Server started on port ' + server.address().port); }); diff --git a/site/index.html b/site/index.html new file mode 100644 index 0000000..413240e --- /dev/null +++ b/site/index.html @@ -0,0 +1,25 @@ + + + + Oops! + + + +

Something's not right!

+

Sorry! Something has gone wrong while handling your request. Please try again later.

+ +