mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-25 14:44:49 +02:00
Merge branch 'master' of github.com:Lissy93/dashy
This commit is contained in:
commit
33855dca40
13
.github/AUTHORS.txt
vendored
13
.github/AUTHORS.txt
vendored
@ -17,6 +17,7 @@ jnach <33467747+jnach@users.noreply.github.com> - 1 commits
|
|||||||
BOZG <sr@bozg.se> - 2 commits
|
BOZG <sr@bozg.se> - 2 commits
|
||||||
Brendan <'Lear> - 2 commits
|
Brendan <'Lear> - 2 commits
|
||||||
Dan <ilber> - 2 commits
|
Dan <ilber> - 2 commits
|
||||||
|
Ruben <ilv> - 2 commits
|
||||||
liss-bot <87835202+liss-bot@users.noreply.github.com> - 2 commits
|
liss-bot <87835202+liss-bot@users.noreply.github.com> - 2 commits
|
||||||
ᗪєνιη <υн> - 2 commits
|
ᗪєνιη <υн> - 2 commits
|
||||||
Walkx <71191962+walkxcode@users.noreply.github.com> - 3 commits
|
Walkx <71191962+walkxcode@users.noreply.github.com> - 3 commits
|
||||||
@ -31,13 +32,13 @@ Alicia <yke> - 16 commits
|
|||||||
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> - 16 commits
|
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> - 16 commits
|
||||||
snyk-bot <snyk-bot@users.noreply.github.com> - 18 commits
|
snyk-bot <snyk-bot@users.noreply.github.com> - 18 commits
|
||||||
EVOTk <45015615+EVOTk@users.noreply.github.com> - 22 commits
|
EVOTk <45015615+EVOTk@users.noreply.github.com> - 22 commits
|
||||||
repo-visualizer <repo-visualizer@users.noreply.github.com> - 22 commits
|
repo-visualizer <repo-visualizer@users.noreply.github.com> - 23 commits
|
||||||
snyk-bot <snyk-bot@snyk.io> - 25 commits
|
|
||||||
Alicia <yke> - 28 commits
|
Alicia <yke> - 28 commits
|
||||||
Alicia <o> - 45 commits
|
snyk-bot <snyk-bot@snyk.io> - 29 commits
|
||||||
liss-bot <liss-bot@d0h.co> - 58 commits
|
Alicia <o> - 47 commits
|
||||||
|
liss-bot <liss-bot@d0h.co> - 59 commits
|
||||||
Alicia <yke> - 60 commits
|
Alicia <yke> - 60 commits
|
||||||
Lissy93 <gh@d0h.co> - 78 commits
|
Lissy93 <gh@d0h.co> - 78 commits
|
||||||
Lissy93 <Lissy93@users.noreply.github.com> - 206 commits
|
Lissy93 <Lissy93@users.noreply.github.com> - 206 commits
|
||||||
Alicia <yke> - 323 commits
|
Alicia <yke> - 332 commits
|
||||||
Alicia <yke> - 1346 commits
|
Alicia <yke> - 1374 commits
|
17
README.md
17
README.md
@ -516,10 +516,25 @@ Huge thanks to the sponsors helping to support Dashy's development!
|
|||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/ratty222">
|
<a href="https://github.com/ratty222">
|
||||||
<img src="https://avatars.githubusercontent.com/u/92832598?v=4" width="80;" alt="ratty222"/>
|
<img src="https://avatars.githubusercontent.com/u/92832598?u=137b65530cbd5f5af9c24cde51baa6cc77cc934b&v=4" width="80;" alt="ratty222"/>
|
||||||
<br />
|
<br />
|
||||||
<sub><b>Ratty222</b></sub>
|
<sub><b>Ratty222</b></sub>
|
||||||
</a>
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/undefined">
|
||||||
|
<img src="" width="80;" alt="undefined"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>undefined</b></sub>
|
||||||
|
</a>
|
||||||
|
</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/jtfinley72">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/96497997?v=4" width="80;" alt="jtfinley72"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>jtfinley72</b></sub>
|
||||||
|
</a>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<!-- readme: sponsors -end -->
|
<!-- readme: sponsors -end -->
|
||||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 4.3 MiB After Width: | Height: | Size: 4.8 MiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 85 KiB |
@ -34,10 +34,25 @@
|
|||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/ratty222">
|
<a href="https://github.com/ratty222">
|
||||||
<img src="https://avatars.githubusercontent.com/u/92832598?v=4" width="80;" alt="ratty222"/>
|
<img src="https://avatars.githubusercontent.com/u/92832598?u=137b65530cbd5f5af9c24cde51baa6cc77cc934b&v=4" width="80;" alt="ratty222"/>
|
||||||
<br />
|
<br />
|
||||||
<sub><b>Ratty222</b></sub>
|
<sub><b>Ratty222</b></sub>
|
||||||
</a>
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/undefined">
|
||||||
|
<img src="" width="80;" alt="undefined"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>undefined</b></sub>
|
||||||
|
</a>
|
||||||
|
</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/jtfinley72">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/96497997?v=4" width="80;" alt="jtfinley72"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>jtfinley72</b></sub>
|
||||||
|
</a>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<!-- readme: sponsors -end -->
|
<!-- readme: sponsors -end -->
|
||||||
@ -124,14 +139,21 @@
|
|||||||
<sub><b>Dan Gilbert</b></sub>
|
<sub><b>Dan Gilbert</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/rubenandre">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/9402773?v=4" width="80;" alt="rubenandre"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>Rúben Silva</b></sub>
|
||||||
|
</a>
|
||||||
|
</td></tr>
|
||||||
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/BeginCI">
|
<a href="https://github.com/BeginCI">
|
||||||
<img src="https://avatars.githubusercontent.com/u/57495754?v=4" width="80;" alt="BeginCI"/>
|
<img src="https://avatars.githubusercontent.com/u/57495754?v=4" width="80;" alt="BeginCI"/>
|
||||||
<br />
|
<br />
|
||||||
<sub><b>Begin</b></sub>
|
<sub><b>Begin</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td></tr>
|
</td>
|
||||||
<tr>
|
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/skaarj1989">
|
<a href="https://github.com/skaarj1989">
|
||||||
<img src="https://avatars.githubusercontent.com/u/34756939?v=4" width="80;" alt="skaarj1989"/>
|
<img src="https://avatars.githubusercontent.com/u/34756939?v=4" width="80;" alt="skaarj1989"/>
|
||||||
@ -166,15 +188,15 @@
|
|||||||
<br />
|
<br />
|
||||||
<sub><b>Ishan Jain</b></sub>
|
<sub><b>Ishan Jain</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td></tr>
|
||||||
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/KierenConnell">
|
<a href="https://github.com/KierenConnell">
|
||||||
<img src="https://avatars.githubusercontent.com/u/46445781?v=4" width="80;" alt="KierenConnell"/>
|
<img src="https://avatars.githubusercontent.com/u/46445781?v=4" width="80;" alt="KierenConnell"/>
|
||||||
<br />
|
<br />
|
||||||
<sub><b>Kieren Connell</b></sub>
|
<sub><b>Kieren Connell</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td></tr>
|
</td>
|
||||||
<tr>
|
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/rubjo">
|
<a href="https://github.com/rubjo">
|
||||||
<img src="https://avatars.githubusercontent.com/u/42270947?v=4" width="80;" alt="rubjo"/>
|
<img src="https://avatars.githubusercontent.com/u/42270947?v=4" width="80;" alt="rubjo"/>
|
||||||
@ -209,7 +231,8 @@
|
|||||||
<br />
|
<br />
|
||||||
<sub><b>Aniket Teredesai</b></sub>
|
<sub><b>Aniket Teredesai</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td></tr>
|
||||||
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/jnach">
|
<a href="https://github.com/jnach">
|
||||||
<img src="https://avatars.githubusercontent.com/u/33467747?v=4" width="80;" alt="jnach"/>
|
<img src="https://avatars.githubusercontent.com/u/33467747?v=4" width="80;" alt="jnach"/>
|
||||||
|
19
server.js
19
server.js
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Note: The app must first be built (yarn build) before this script is run
|
|
||||||
* This is the main entry point for the application, a simple server that
|
* This is the main entry point for the application, a simple server that
|
||||||
* runs some checks, and then serves up the app from the ./dist directory
|
* runs some checks, and then serves up the app from the ./dist directory
|
||||||
* Also includes some routes for status checks/ ping and config saving
|
* Also imports some routes for status checks/ ping and config saving
|
||||||
|
* Note: The app must first be built (yarn build) before this script is run
|
||||||
* */
|
* */
|
||||||
|
|
||||||
/* Import built-in Node server modules */
|
/* Import built-in Node server modules */
|
||||||
@ -46,10 +46,15 @@ const getLocalIp = () => {
|
|||||||
|
|
||||||
/* Gets the users local IP and port, then calls to print welcome message */
|
/* Gets the users local IP and port, then calls to print welcome message */
|
||||||
const printWelcomeMessage = () => {
|
const printWelcomeMessage = () => {
|
||||||
|
try {
|
||||||
getLocalIp().then(({ address }) => {
|
getLocalIp().then(({ address }) => {
|
||||||
const ip = address || 'localhost';
|
const ip = address || 'localhost';
|
||||||
console.log(printMessage(ip, port, isDocker)); // eslint-disable-line no-console
|
console.log(printMessage(ip, port, isDocker)); // eslint-disable-line no-console
|
||||||
});
|
});
|
||||||
|
} catch (e) {
|
||||||
|
// Fetching info for welcome message failed, print simple msg instead
|
||||||
|
console.log(`Dashy server has started (${port})`); // eslint-disable-line no-console
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Just console.warns an error */
|
/* Just console.warns an error */
|
||||||
@ -65,7 +70,7 @@ const app = express()
|
|||||||
.use(express.static(path.join(__dirname, 'dist')))
|
.use(express.static(path.join(__dirname, 'dist')))
|
||||||
.use(express.static(path.join(__dirname, 'public'), { index: 'initialization.html' }))
|
.use(express.static(path.join(__dirname, 'public'), { index: 'initialization.html' }))
|
||||||
// Load middlewares for parsing JSON, and supporting HTML5 history routing
|
// Load middlewares for parsing JSON, and supporting HTML5 history routing
|
||||||
.use(express.json())
|
.use(express.json({ limit: '1mb' }))
|
||||||
.use(history())
|
.use(history())
|
||||||
// GET endpoint to run status of a given URL with GET request
|
// GET endpoint to run status of a given URL with GET request
|
||||||
.use(ENDPOINTS.statusCheck, (req, res) => {
|
.use(ENDPOINTS.statusCheck, (req, res) => {
|
||||||
@ -114,7 +119,13 @@ const app = express()
|
|||||||
});
|
});
|
||||||
|
|
||||||
/* Create HTTP server from app on port, and print welcome message */
|
/* Create HTTP server from app on port, and print welcome message */
|
||||||
http.createServer(app).listen(port, () => { printWelcomeMessage(); });
|
http.createServer(app)
|
||||||
|
.listen(port, () => {
|
||||||
|
printWelcomeMessage();
|
||||||
|
})
|
||||||
|
.on('error', (err) => {
|
||||||
|
printWarning('Unable to start Dashy\'s Node server', err);
|
||||||
|
});
|
||||||
|
|
||||||
/* Check, and if possible start SSL server too */
|
/* Check, and if possible start SSL server too */
|
||||||
sslServer(app);
|
sslServer(app);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user