Port Backend to SQLite/Sequelize (removes MongoDB), Support Electron (#14)
* The MongoDB/Mongoose data storage is removed in favor of Sequelize. This abstracts over SQLite or RDBMs like PostgreSQL and MSSQL. The default is SQLite, which significantly simplifies deployments in end-user environments. * As Spacedeck now has no more mandatory server dependencies, we can wrap it in Electron and ship it as a desktop application. * Removes docker-compose.yml * First version of import UI
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
require('../models/schema');
|
||||
require('../models/db');
|
||||
const config = require('config');
|
||||
const url = require('url');
|
||||
|
||||
@@ -26,20 +26,20 @@ module.exports = (req, res, next) => {
|
||||
const parsedUrl = url.parse(origin, true, true);
|
||||
|
||||
// FIXME
|
||||
if (parsedUrl.hostname == "cdn.spacedeck.com") {
|
||||
if (parsedUrl.hostname == "cdn.spacedeck.com") {
|
||||
res.header('Cache-Control', "max-age");
|
||||
res.header('Expires', "30d");
|
||||
res.removeHeader("Pragma");
|
||||
|
||||
respond(origin, req, res, next);
|
||||
} else {
|
||||
Team.getTeamForHost(parsedUrl.hostname, (err, team, subdomain) => {
|
||||
if (team) {
|
||||
//Team.getTeamForHost(parsedUrl.hostname, (err, team, subdomain) => {
|
||||
//if (team) {
|
||||
respond(origin, req, res, next);
|
||||
} else {
|
||||
//} else {
|
||||
next();
|
||||
}
|
||||
});
|
||||
//}
|
||||
//});
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user