Top-gg-Community / node-sdk

An official module for interacting with the Top.gg API
https://topgg.js.org/
133 stars 42 forks source link

Express is not running. #23

Closed SudhanPlayz closed 4 years ago

SudhanPlayz commented 4 years ago

Express is not running while i add dbl webhook to my code

tonkku107 commented 4 years ago

Please include more information like the code you have written and any errors

SudhanPlayz commented 4 years ago
const DBL = require('dblapi.js');
const dbl = new DBL(process.env.TOP_GG, { webhookPort: process.env.PORT, webhookAuth: 'Tqbb72c7beyu2qQDUwue' });

dbl.webhook.on('posted', () => {
console.log("posted");
})

const express = require('express')
const app = express()
app.get("/", (req, res) => {
res.send("Hi!")
})

When i gone to/ its not working

SudhanPlayz commented 4 years ago

@tonkku107 Sent

tonkku107 commented 4 years ago

The code snippet is missing a listen call...

Please also check the example for linking to an existing express server from the documentation.

If you need help setting things up, please ask in the #api channel in the discord server instead of creating an issue.