Merge branch 'main' into docker
This commit is contained in:
23
.vscode/launch.json
vendored
23
.vscode/launch.json
vendored
@@ -7,7 +7,7 @@
|
||||
{
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
"name": "nodemon",
|
||||
"name": "nodemon (dev)",
|
||||
"program": "dev",
|
||||
"request": "launch",
|
||||
"restart": true,
|
||||
@@ -17,7 +17,24 @@
|
||||
],
|
||||
"type": "node",
|
||||
"env": {"NODE_ENV": "development"},
|
||||
"preLaunchTask": "npm: scss"
|
||||
}
|
||||
"preLaunchTask": "npm: build-css"
|
||||
},
|
||||
{
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
"name": "nodemon (with scss watch)",
|
||||
"program": "dev (with scss watch)",
|
||||
"request": "launch",
|
||||
"restart": true,
|
||||
"runtimeExecutable": "nodemon",
|
||||
"runtimeArgs": ["-e", "js,scss"],
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"env": {"NODE_ENV": "development"},
|
||||
"preLaunchTask": "npm: build-css"
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
16
.vscode/tasks.json
vendored
16
.vscode/tasks.json
vendored
@@ -3,17 +3,21 @@
|
||||
"tasks": [
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "scss",
|
||||
"script": "watch-scss",
|
||||
"problemMatcher": [],
|
||||
"label": "npm: scss watch",
|
||||
"detail": "sass --watch src/scss/application.scss public/css/application.css src/scss/eventsheet.scss:public/css/eventsheet.css"
|
||||
"label": "npm: watch-scss",
|
||||
"detail": "npm run watch-css",
|
||||
"icon": {
|
||||
"id": "eye",
|
||||
"color": "terminal.ansiBlue"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "scss",
|
||||
"script": "build-css",
|
||||
"problemMatcher": [],
|
||||
"label": "npm: scss",
|
||||
"detail": "sass src/scss/application.scss:public/css/application.css src/scss/eventsheet.scss:public/css/eventsheet.css"
|
||||
"label": "npm: build-css",
|
||||
"detail": "npm build-css"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -24,9 +24,9 @@
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node ./bin/www",
|
||||
"dev": "nodemon . & npm run scss",
|
||||
"scss": "sass src/scss/application.scss:src/public/css/application.css src/scss/eventsheet.scss:src/public/css/eventsheet.css",
|
||||
"scss watch": "sass --watch src/scss/application.scss:src/public/css/application.css src/scss/eventsheet.scss:src/public/css/eventsheet.css"
|
||||
"dev": "nodemon .",
|
||||
"build-css": "sass src/scss:src/public/css",
|
||||
"watch-scss": "nodemon -e scss -x \"npm run build-css\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@teamsnap/teamsnap-ui": "^3.12.3",
|
||||
|
||||
@@ -63,6 +63,7 @@ app.locals.pluralize = require("pluralize");
|
||||
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
var connectLiveReload = require("connect-livereload");
|
||||
app.use("/scss", express.static(path.join(__dirname, "scss")));
|
||||
app.use(connectLiveReload());
|
||||
}
|
||||
|
||||
@@ -172,7 +173,8 @@ app.use(function (err, req, res, next) {
|
||||
|
||||
// catch 404 and forward to error handler
|
||||
app.use(function (req, res, next) {
|
||||
next(createError(404));
|
||||
// next(createError(404));
|
||||
res.status(404).send('not found')
|
||||
});
|
||||
|
||||
app.set('trust proxy')
|
||||
|
||||
Reference in New Issue
Block a user