An error occurred while loading the file. Please try again.
  • mntmn's avatar
    Port Backend to SQLite/Sequelize (removes MongoDB), Support Electron (#14) · ebac854d
    mntmn authored
    * 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
    ebac854d
basic_auth_server.js 478 bytes
var http = require("http");
var auth = require("http-auth");
var basic = auth.basic({
  authRealm: "Private area",
  authFile: __dirname + "/htpasswd",
  authType: "basic"
});
var server = http.createServer(function(request, response) {
  basic.apply(request, response, function(username) {
    response.writeHead(200, {"Content-Type": "text/plain"});
    response.write("Hello " + username);
    response.end();
  });
});
server.listen(80);
console.log("Server is listening");