Skip to content

Commit

Permalink
Added landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
Kahn committed Sep 30, 2021
1 parent 965e2ed commit 87e3c2d
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ var corsOptions = {
optionsSuccessStatus: 200 // some legacy browsers (IE11, various SmartTVs) choke on 204
}

app.get('/', cors(), async (req, res) => {
res.send(`
<ul>
<li><a href="/static/sectormap.html">ATC sector map</a></li>
<li><a href="/static/map.html?theme=light">Pilots map - light theme</a></li>
<li><a href="/static/map.html?theme=light">Pilots map - dark theme</a></li>
</ul>
`);
});

app.use('/static', express.static('public'));
app.use('/favicon.ico', express.static('public/favicon.ico'));

Expand Down Expand Up @@ -72,8 +82,4 @@ app.get('/v1/cache/stats', cors(), (req, res) => {
});

app.listen(PORT, HOST);
console.log(`Running on http://${HOST}:${PORT}`);

// Warm cache
getPilots();
// getATCSectors();
console.log(`Running on http://${HOST}:${PORT}`);

0 comments on commit 87e3c2d

Please sign in to comment.