'use strict' const express = require('express') const app = express() const port = 3000 function progressSimulation (res) { var progress = 0.0 var timer = setInterval(() => { var resp = JSON.stringify({ Status: ['Processing...', progress] }) + '\n' progress += 0.1 res.write(resp) if (progress >= 1) { res.status(200).end() clearInterval(timer) } }, 1500) } app.get('/api/attrs', (req, res) => { res.send( `var base_attributes = {"name":"yuzu","target_url":"https://raw.githubusercontent.com/j-selby/test-installer/master/config.linux.v2.toml"};` ) }) app.get('/api/dark-mode', (req, res) => { res.json(false) }) app.get('/api/installation-status', (req, res) => { res.json({ database: { packages: [], shortcuts: [] }, install_path: null, preexisting_install: false, is_launcher: false, launcher_path: null }) }) app.get('/api/default-path', (req, res) => { res.json({ path: '/tmp/test/' }) }) app.get('/api/config', (req, res) => { res.json({ installing_message: 'Test Banner Bold
Code blockItalic
Code blockItalic