Commits (4)
{
"presets": ["@babel/preset-env", "@babel/preset-typescript", "minify"]
}
\ No newline at end of file
......@@ -4,8 +4,6 @@ pages-testing:
- npm install
- npm run clean
- npm run build
- rm -rf ./built/views
- cp -R ./src/views ./built
- cat $configfiledev > ./built/config/config.js
- "pm2 delete --silent project || :"
- pm2 start ./built/app.js --name=project
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -14,13 +14,13 @@
"url": "https://transfer.hft-stuttgart.de/gitlab/m4lab_tv1/project-page.git"
},
"scripts": {
"clean-code": "ts-standard --fix",
"check-types": "tsc --noEmit",
"test": "jest",
"start:dev": "nodemon ./src/app.ts",
"start": "nodemon ./built/app.js",
"build": "tsc -build",
"clean": "tsc -build --clean",
"check-types": "tsc",
"test": "jest",
"cleancode": "ts-standard --fix"
"clean": "rm -rf ./built",
"build": "babel src --out-dir built --extensions .ts --copy-files"
},
"dependencies": {
"async": "^3.2.0",
......@@ -39,6 +39,10 @@
},
"license": "MIT",
"devDependencies": {
"@babel/cli": "^7.17.10",
"@babel/core": "^7.18.5",
"@babel/preset-env": "^7.18.2",
"@babel/preset-typescript": "^7.17.12",
"@types/async": "^3.2.6",
"@types/compression": "^1.7.0",
"@types/cookie-parser": "^1.4.2",
......@@ -49,6 +53,7 @@
"@types/jest": "^28.1.2",
"@types/morgan": "^1.9.2",
"@types/passport": "^1.0.6",
"babel-preset-minify": "^0.5.2",
"jest": "^28.1.1",
"nodemon": "^2.0.9",
"ts-jest": "^28.0.5",
......
......@@ -7,6 +7,7 @@ import helmet from 'helmet'
import compression from 'compression'
const env = process.env.NODE_ENV ?? 'testing'
//import {config} from './config/config'
const config = require('./config/config')[env]
const lang = 'DE'
......
......@@ -32,9 +32,9 @@ projectConnection.connect(function (err) {
})
projectConnection.query('USE ' + String(config.database.dbProject))
const connection = {
const dbconn = {
user: userConnection,
project: projectConnection
}
export = connection
export {dbconn}
import helpers from '../utils/helpers'
import gitlab from './gitlab'
import https from 'https'
import {helpers} from '../utils/helpers'
import {gitlab} from './gitlab'
import {dbconn} from '../config/dbconn'
const dbconn = require('../config/dbconn')
const lang = 'DE'
const controller = {
......@@ -239,4 +239,4 @@ const controller = {
}
}
export = controller
export {controller}
......@@ -41,4 +41,4 @@ const gitlab = {
}
}
export = gitlab
export {gitlab}
import controller from '../controller/controller'
import {controller} from '../controller/controller'
module.exports = function (app: any) {
// ======== APP ROUTES - PROJECT ====================
......
......@@ -5,4 +5,4 @@ const helpers = {
}
}
export = helpers
export {helpers}
......@@ -22,9 +22,10 @@ html(lang="de")
div(class="container")
div(class="center", align="center")
a(href="https://m4lab.hft-stuttgart.de")
img(src="https://transfer.hft-stuttgart.de/images/demo/m4lab_logo.jpg", class="img-responsive center-block", width="185", height="192")
img(src="https://transfer.hft-stuttgart.de/img/M4_LAB_LOGO.jpg", class="img-responsive center-block", width="185", height="192")
br
br
p(class="h5") 404. The requested URL was not found.
p <a href="./">go back home</a>
// Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
\ No newline at end of file
......@@ -22,9 +22,10 @@ html(lang="de")
div(class="container")
div(class="center", align="center")
a(href="https://m4lab.hft-stuttgart.de")
img(src="https://transfer.hft-stuttgart.de/images/demo/m4lab_logo.jpg", class="img-responsive center-block", width="185", height="192")
img(src="https://transfer.hft-stuttgart.de/img/M4_LAB_LOGO.jpg", class="img-responsive center-block", width="185", height="192")
br
br
p <a href="./">go back home</a>
p(class="h5") 500. Unexpected Error :(
p #{ error }
// Bootstrap
......
{
"exclude": ["node_modules", "__test", "jest.config.js"],
"compilerOptions": {
"target": "es6",
// Target latest version of ECMAScript.
"target": "esnext",
// Search under node_modules for non-relative imports.
"moduleResolution": "node",
"module": "commonjs",
// Enable strictest settings like strictNullChecks & noImplicitAny.
"strict": true,
"outDir": "./built",
"rootDir": "./src",
"esModuleInterop": true,
"allowJs": true
}
// Disallow features that require cross-file information for emit. Ensure that Babel can safely transpile files in the TypeScript project
"isolatedModules": true,
// Import non-ES modules as default imports.
"esModuleInterop": true,
// Process & infer types from .js files.
"allowJs": true,
// Don't emit; allow Babel to transform files.
"noEmit": true
},
"include": [
"src"
]
}
\ No newline at end of file