Browse Source

add index.html

master
filesite 8 months ago
parent
commit
1d583a9205
  1. 5
      index.mjs
  2. 29
      public/index.html
  3. 2
      public/js/jquery-3.7.1.min.js

5
index.mjs

@ -22,9 +22,14 @@ app.use(bodyParser.json())
app.use('/api', apiRouter); app.use('/api', apiRouter);
//开启静态文件支持
app.use(express.static('public'));
/*
app.get('/', (req, res) => { app.get('/', (req, res) => {
return res.send('Welcome to Hero Union of filesite.io'); return res.send('Welcome to Hero Union of filesite.io');
}); });
*/
app.post('/test', (req, res) => { app.post('/test', (req, res) => {
console.log('Post data got in /test', req.body); console.log('Post data got in /test', req.body);

29
public/index.html

@ -0,0 +1,29 @@
<!doctype html>
<html class="no-js" lang="en-US">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width">
<title>HeroUnion英雄联盟 - Hero爬虫联盟</title>
<meta name="author" content="HeroUnion英雄联盟 - filesite.io">
<meta name="description" content="HeroUnion: A union of hero bots, Hero爬虫的英雄联盟。">
<script src="/js/jquery-3.7.1.min.js"></script>
</head>
<body>
<h1>HeroUnion英雄联盟 <small>- Hero爬虫联盟</small></h1>
<h3>HeroUnion联盟状态</h3>
<pre><code id="herounion_stats">...</code></pre>
<script type="text/javascript">
var api = '/api/stats/';
$.ajax({
url: api,
method: 'GET',
dataType: 'json'
}).done(function(data) {
$('#herounion_stats').text(JSON.stringify(data, null, 4));
});
</script>
</body>
</html>

2
public/js/jquery-3.7.1.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save