-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-
- Loading branch information
Showing
13 changed files
with
284 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
|
||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
... | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>NetGet src/routes/defaultRoutes.js</title> | ||
|
||
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script> | ||
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script> | ||
<script src="./build/entry.js"></script> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | ||
<!--[if lt IE 9]> | ||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | ||
<![endif]--> | ||
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet"> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous"> | ||
<link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css"> | ||
<link type="text/css" rel="stylesheet" href="styles/app.min.css"> | ||
<link type="text/css" rel="stylesheet" href="styles/iframe.css"> | ||
<link type="text/css" rel="stylesheet" href="style.css"> | ||
<script async defer src="https://buttons.github.io/buttons.js"></script> | ||
|
||
|
||
</head> | ||
|
||
|
||
|
||
<body class="layout small-header"> | ||
<div id="stickyNavbarOverlay"></div> | ||
|
||
|
||
<div class="top-nav"> | ||
<div class="inner"> | ||
<a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false"> | ||
<span aria-hidden="true"></span> | ||
<span aria-hidden="true"></span> | ||
<span aria-hidden="true"></span> | ||
</a> | ||
<div class="logo"> | ||
|
||
|
||
<a href="index.html"> | ||
<h1 class="navbar-item">NetGet</h1> | ||
</a> | ||
|
||
</div> | ||
<div class="menu"> | ||
|
||
<div class="navigation"> | ||
<a | ||
href="index.html" | ||
class="link" | ||
> | ||
Documentation | ||
</a> | ||
|
||
|
||
|
||
<a | ||
class="link user-link " | ||
href="https://suign.github.io/all.this/" | ||
> | ||
All.This | ||
</a> | ||
|
||
<a | ||
class="link user-link " | ||
href="https://suign.github.io/" | ||
> | ||
@Source | ||
</a> | ||
|
||
<a | ||
class="link user-link " | ||
href="https://github.com/suiGn/netget" | ||
> | ||
Github | ||
</a> | ||
|
||
<a | ||
class="link user-link " | ||
href="https://netget.me" | ||
> | ||
netget.me | ||
</a> | ||
|
||
<a | ||
class="link user-link " | ||
href="https://www.neurons.me/all-this" | ||
> | ||
What is all.this? | ||
</a> | ||
|
||
|
||
|
||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div id="main"> | ||
<div | ||
class="sidebar " | ||
id="sidebarNav" | ||
> | ||
|
||
<div class="search-wrapper"> | ||
<input id="search" type="text" placeholder="Search docs..." class="input"> | ||
</div> | ||
|
||
<nav> | ||
|
||
<h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Modules</h3><ul><li><a href="module-index.html">index</a></li></ul><h3>Classes</h3><ul><li><a href="Gateway.html">Gateway</a></li></ul><h3>Global</h3><ul><li><a href="global.html#testGateway">testGateway</a></li></ul></div> | ||
|
||
</nav> | ||
</div> | ||
<div class="core" id="main-content-wrapper"> | ||
<div class="content"> | ||
<header class="page-title"> | ||
<p>Source</p> | ||
<h1>src/routes/defaultRoutes.js</h1> | ||
</header> | ||
|
||
|
||
|
||
|
||
|
||
<section> | ||
<article> | ||
<pre class="prettyprint source linenums"><code>// ./src/handlers/defaultHandler.js | ||
/** | ||
* Renders a default response when no specific handler is found for a request. | ||
* This function serves as a fallback handler to provide informative feedback to the user or administrator. | ||
* It indicates whether no handlers are defined at all or if a specific handler for the requested domain is missing. | ||
* | ||
* @param {Object} req - The HTTP request object provided by Express.js. | ||
* @param {Object} res - The HTTP response object provided by Express.js. | ||
* @param {boolean} [noRoutessDefined=false] - Indicates whether no handlers have been defined in the gateway. | ||
*/ | ||
export default function defaultRoutes(req, res, noRoutesDefined = false) { | ||
let message = " "; | ||
if (noRoutesDefined) { | ||
message += " No Routes have been defined.<br/> To configure your Domain Routes, please refer to Docs: <br/> https://netget.me "; | ||
} else { | ||
message += ` No Route found for ${req.hostname}.<br/> If you are the administrator, please define a route for this domain. <br/> https://netget.me `; | ||
} | ||
|
||
const showDomainListLink = !noRoutesDefined; | ||
|
||
res.render('index', { | ||
title: "Gateway Initiated!", | ||
message: message, | ||
showDomainListLink: showDomainListLink | ||
}); | ||
} | ||
</code></pre> | ||
</article> | ||
</section> | ||
|
||
|
||
|
||
|
||
</div> | ||
|
||
<footer class="footer"> | ||
<div class="content has-text-centered"> | ||
<p> | ||
<style> | ||
.center-div { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 89px; | ||
} | ||
|
||
img { | ||
max-width: 100%; | ||
max-height: 100%; | ||
} | ||
</style> | ||
<div class="center-div"> | ||
<img src="https://suign.github.io/neurons.me/neurons_logo.png" alt="Witness our Seal."> | ||
</div> | ||
<a href="http://neurons.me" target="_blank">neurons.me</a> | ||
</p> | ||
</div> | ||
</footer> | ||
|
||
</div> | ||
<div id="side-nav" class="side-nav"> | ||
</div> | ||
</div> | ||
<script src="scripts/app.min.js"></script> | ||
<script>PR.prettyPrint();</script> | ||
<script src="scripts/linenumber.js"> </script> | ||
|
||
<script src="scripts/search.js"> </script> | ||
|
||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.