api route

This commit is contained in:
codepupper 2019-11-11 16:34:04 +01:00
parent fafbda09bb
commit 30a1644d10
2 changed files with 31 additions and 3 deletions

17
Dashboard/routes/api.js Normal file
View file

@ -0,0 +1,17 @@
var express = require('express');
var api = express.Router();
api.get('/', (req, res) => {
console.log(ints['sfw'][1])
res.status(200).jsonp({
success: true
})
});
module.exports = api;

View file

@ -1,5 +1,12 @@
const express = require('express');
const { hostname, port, authorization, source, invite, type } = require('../config');
const {
hostname,
port,
authorization,
source,
invite,
type
} = require('../config');
const db = require('quick.db');
const Backend = new db.table('backend');
const chalk = require('chalk');
@ -26,7 +33,9 @@ app.set('view options', {
});
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(express.urlencoded({
extended: true
}));
app.use(helmet());
app.use(compression());
app.use(cors());
@ -42,6 +51,8 @@ app.use(
].join(' ');
})
);
app.use('/api', require(''))
let support = 'https://discord.gg/' + Backend.get('Info.invite');
module.exports = (client) => {
app.get('/', async (req, res) => {