mirror of https://github.com/Lissy93/dashy.git
Merge branch 'master' of github.com:Lissy93/dashy
This commit is contained in:
commit
33855dca40
|
@ -17,6 +17,7 @@ jnach <33467747+jnach@users.noreply.github.com> - 1 commits
|
|||
BOZG <sr@bozg.se> - 2 commits
|
||||
Brendan <'Lear> - 2 commits
|
||||
Dan <ilber> - 2 commits
|
||||
Ruben <ilv> - 2 commits
|
||||
liss-bot <87835202+liss-bot@users.noreply.github.com> - 2 commits
|
||||
ᗪєνιη <υн> - 2 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
|
||||
snyk-bot <snyk-bot@users.noreply.github.com> - 18 commits
|
||||
EVOTk <45015615+EVOTk@users.noreply.github.com> - 22 commits
|
||||
repo-visualizer <repo-visualizer@users.noreply.github.com> - 22 commits
|
||||
snyk-bot <snyk-bot@snyk.io> - 25 commits
|
||||
repo-visualizer <repo-visualizer@users.noreply.github.com> - 23 commits
|
||||
Alicia <yke> - 28 commits
|
||||
Alicia <o> - 45 commits
|
||||
liss-bot <liss-bot@d0h.co> - 58 commits
|
||||
snyk-bot <snyk-bot@snyk.io> - 29 commits
|
||||
Alicia <o> - 47 commits
|
||||
liss-bot <liss-bot@d0h.co> - 59 commits
|
||||
Alicia <yke> - 60 commits
|
||||
Lissy93 <gh@d0h.co> - 78 commits
|
||||
Lissy93 <Lissy93@users.noreply.github.com> - 206 commits
|
||||
Alicia <yke> - 323 commits
|
||||
Alicia <yke> - 1346 commits
|
||||
Alicia <yke> - 332 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 align="center">
|
||||
<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 />
|
||||
<sub><b>Ratty222</b></sub>
|
||||
</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>
|
||||
</table>
|
||||
<!-- 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 align="center">
|
||||
<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 />
|
||||
<sub><b>Ratty222</b></sub>
|
||||
</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>
|
||||
</table>
|
||||
<!-- readme: sponsors -end -->
|
||||
|
@ -124,14 +139,21 @@
|
|||
<sub><b>Dan Gilbert</b></sub>
|
||||
</a>
|
||||
</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">
|
||||
<a href="https://github.com/BeginCI">
|
||||
<img src="https://avatars.githubusercontent.com/u/57495754?v=4" width="80;" alt="BeginCI"/>
|
||||
<br />
|
||||
<sub><b>Begin</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/skaarj1989">
|
||||
<img src="https://avatars.githubusercontent.com/u/34756939?v=4" width="80;" alt="skaarj1989"/>
|
||||
|
@ -166,15 +188,15 @@
|
|||
<br />
|
||||
<sub><b>Ishan Jain</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/KierenConnell">
|
||||
<img src="https://avatars.githubusercontent.com/u/46445781?v=4" width="80;" alt="KierenConnell"/>
|
||||
<br />
|
||||
<sub><b>Kieren Connell</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/rubjo">
|
||||
<img src="https://avatars.githubusercontent.com/u/42270947?v=4" width="80;" alt="rubjo"/>
|
||||
|
@ -209,7 +231,8 @@
|
|||
<br />
|
||||
<sub><b>Aniket Teredesai</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/jnach">
|
||||
<img src="https://avatars.githubusercontent.com/u/33467747?v=4" width="80;" alt="jnach"/>
|
||||
|
|
27
server.js
27
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
|
||||
* 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 */
|
||||
|
@ -46,10 +46,15 @@ const getLocalIp = () => {
|
|||
|
||||
/* Gets the users local IP and port, then calls to print welcome message */
|
||||
const printWelcomeMessage = () => {
|
||||
getLocalIp().then(({ address }) => {
|
||||
const ip = address || 'localhost';
|
||||
console.log(printMessage(ip, port, isDocker)); // eslint-disable-line no-console
|
||||
});
|
||||
try {
|
||||
getLocalIp().then(({ address }) => {
|
||||
const ip = address || 'localhost';
|
||||
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 */
|
||||
|
@ -65,7 +70,7 @@ const app = express()
|
|||
.use(express.static(path.join(__dirname, 'dist')))
|
||||
.use(express.static(path.join(__dirname, 'public'), { index: 'initialization.html' }))
|
||||
// Load middlewares for parsing JSON, and supporting HTML5 history routing
|
||||
.use(express.json())
|
||||
.use(express.json({ limit: '1mb' }))
|
||||
.use(history())
|
||||
// GET endpoint to run status of a given URL with GET request
|
||||
.use(ENDPOINTS.statusCheck, (req, res) => {
|
||||
|
@ -114,7 +119,13 @@ const app = express()
|
|||
});
|
||||
|
||||
/* 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 */
|
||||
sslServer(app);
|
||||
|
|
Loading…
Reference in New Issue