浏览代码

make it work 4

tags/Beta0.1
calexil 1年前
父节点
当前提交
86c9aa05ac
共有 1 个文件被更改,包括 14 次插入2 次删除
  1. 14
    2
      bot.js

+ 14
- 2
bot.js 查看文件

@@ -1,10 +1,22 @@
const Discord = require('discord.js');
const client = new Discord.Client();

const express = require('express')
const app = express()
const express = require('express');
const app = express();
const bodyParser = require('body-parser');

app.use(express.static('public'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

app.listen(process.env.PORT, () => console.log(`App listening on port ${process.env.PORT}!`))
app.post('/endpoint', (req, res) => {
let trackName = req.body.trackName;
res.send('Track received!');
console.log(`Track: ${trackName}`)
});



wget --post-data "trackName=HelloWorld" https://bansheebot.herokuapp.com/endpoint


正在加载...
取消
保存