Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"type": "module",
"scripts": {
"start": "nodemon --ignore sessions index.js",
"start": "nodemon --ignore sessions ./src/index.js",
"docker": "run-s migrate start",
"test": "mocha --no-timeouts tests/*/*.spec.js",
"coverage": "nyc --reporter=text npm test",
Expand Down
2 changes: 1 addition & 1 deletion Database/database.js → src/Database/database.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This script runs on serverside

import conn from './databaseConnection.js';
import User from '../user.js';
import User from '../models/user.js';
import escape from 'lodash.escape';
import helper from '../helper.js';
import { encrypt, decrypt } from '../crypto/crypto.js';
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions administration.js → src/controllers/administration.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// This script runs on serversider

//dependencies required for the app
import connection from './Database/database.js';
import connection from './../Database/database.js';
import escape from 'lodash.escape';
import customer from './customer.js';
import moment from 'moment';
import { decrypt } from './crypto/crypto.js';
import { decrypt } from './../crypto/crypto.js';
import { promisify } from 'es6-promisify';

let encryptArray = []; // Darf nicht in die function rein.
Expand Down
8 changes: 4 additions & 4 deletions customer.js → src/controllers/customer.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// This script runs on serverside

//dependencies required for the app
import connection from './Database/database.js';
import encrypt1 from './crypto/encrypt.js';
import User from './user.js';
import sessionHandler from './sessionHandler.js';
import connection from './../Database/database.js';
import encrypt1 from './../crypto/encrypt.js';
import User from './../models/user.js';
import sessionHandler from './../sessionHandler.js';

/** Sign up a new user
*
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions index.js → src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import middleware from 'i18next-http-middleware';
import i18next from 'i18next';
import Backend from 'i18next-fs-backend';
import FileStore from 'session-file-store';
import routes from './routes.js';
import routes from './routes/routes.js';
import cache from './cache.js';

const SessionFileStore = FileStore(session);
Expand Down Expand Up @@ -54,10 +54,11 @@ app.use(helmet({
// https://stackoverflow.com/questions/35931135/cannot-post-error-using-express
app.use(bodyParser.urlencoded({ extended: false }));

app.set('views','./src/views');
app.set('view engine', 'ejs');

// render css files
app.use(express.static('public'));
app.use(express.static('src/public'));

// Is only stored on server.
app.use(session({
Expand Down
File renamed without changes.
File renamed without changes.
Loading